Skip to content

Instantly share code, notes, and snippets.

View seieric's full-sized avatar

Seiya Eriguchi seieric

  • Japan
  • 23:38 (UTC +09:00)
View GitHub Profile
@whiler
whiler / create-a-workable-IPv6-network-for-ocserv-clients.md
Created June 6, 2021 05:40
create a workable IPv6 network for ocserv clients

create a workable IPv6 network for ocserv clients

  1. enable NDP proxy at ocserv server host: sysctl -w net.ipv6.conf.all.proxy_ndp=1 .

  2. assign a sub network of ocserv server host IPv6 network for clients, for example:

    if the IPv6 address of ocserv server host inteface eth0 is 2608:8207:7888:a450::1/64, then add the fellowing lines into ocserv.conf:

    ipv6-network = 2608:8207:7888:a450:cafe::/80
    
@fedek6
fedek6 / opcache-preload.php
Created October 30, 2020 09:18
Working WordPress opcache preloading config
<?php
/**
* WordPress opcache preloading.
* Requires PHP >= 7.4.
*
* @author Konrad Fedorczyk <contact@realhe.ro>
* @link https://stitcher.io/blog/preloading-in-php-74
*
* @version 1.0.0
*/
@raulqf
raulqf / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Last active September 10, 2024 08:07
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@bradtraversy
bradtraversy / docker-help.md
Last active September 14, 2024 18:01
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@nak1114
nak1114 / install-rbenv-win.bat
Last active June 19, 2023 08:44
Batch for install rbenv-win (require windows Vista+)
@echo off
setlocal
rem Set your rbenv directry
set instpath="%USERPROFILE%\.rbenv-win"
rem Clone git repositry
call git clone https://github.com/nak1114/rbenv-win.git %instpath%
rem Config path
@seratch
seratch / Gemfile
Last active April 2, 2024 13:22
twitter oauth example
source 'https://rubygems.org/'
gem 'sinatra'
gem 'omniauth-twitter'
gem 'json'
gem 'twitter'
gem 'dotenv'
gem 'thin'
@tleish
tleish / mysql_backup.sh
Last active September 13, 2024 11:28
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@ktx2207
ktx2207 / Git_ファイルの履歴を完全に削除する.md
Last active February 17, 2024 05:32
Git ファイルの履歴を完全に削除する

Git ファイルの履歴を完全に削除する

秘密鍵など誤ってコミットしてしまった場合に履歴を完全に削除する手順
参考:6.4 Git のさまざまなツール - 歴史の書き換え

動作確認用にブランチを作成して試す

$ git checkout -b clean-key-file

動作確認用にブランチでgit filter-branchを実行

@hnaohiro
hnaohiro / webcam.rb
Created August 6, 2013 06:30
RubyでWebカメラを使い、WebSocketで配信する最小のコード
require 'opencv'
require 'em-websocket'
require 'base64'
class WebCam
def initialize(n = 0)
@cap = OpenCV::CvCapture.open(n)
end
def get_with_base64
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。