Skip to content

Instantly share code, notes, and snippets.

@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active June 19, 2024 09:12
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@vadim-kovalyov
vadim-kovalyov / .gitconfig
Created August 30, 2016 17:18
How to enable TortoiseGitMerge as an external diff/merge tool in Visual Studio 2015
#Add this into your local (.git/config) or global (%USER_HOME%/.gitconfig) git config file.
[diff]
tool = tgm
[difftool "tgm"]
cmd = \"C:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = tgm
[mergetool "tgm"]
cmd = \"C:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
@wotupset
wotupset / 160830.poi
Last active April 23, 2024 09:16
komica大爆射的gif貼圖跟顏文字
++
(´◓Д◔`) 哇幹!!
( っค้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้c )
++
(´◓Д◔`) 哇幹!!
( っค้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้้c )
++
@antic183
antic183 / remove-utf8-bom.js
Last active March 13, 2024 08:45
remove utf-8 bom with javascript
// remove utf-8 BOM from ressource "res"
// res.charCodeAt(0) === 0xFEFF | res.charCodeAt(0) === 65279
if (res.charCodeAt(0) === 0xFEFF) {
res = res.substr(1);
}
@jackgill
jackgill / bundle.js
Last active March 25, 2024 13:53
A node.js script to create a bundle containing an npm package, and all of its dependencies.
/*
* This script will download a package (and all of its dependencies) from the
* online NPM registry, then create a gzip'd tarball containing that package
* and all of its dependencies. This archive can then be copied to a machine
* without internet access and installed using npm.
*
* The idea is pretty simple:
* - npm install [package]
* - rewrite [package]/package.json to copy dependencies to bundleDependencies
* - npm pack [package]
@niw
niw / libpng_test.c
Last active June 19, 2024 10:32
How to read and write PNG file using libpng. Covers trivial method calls like png_set_filler.
/*
* A simple libpng example program
* http://zarb.org/~gc/html/libpng.html
*
* Modified by Yoshimasa Niwa to make it much simpler
* and support all defined color_type.
*
* To build, use the next instruction on OS X.
* $ brew install libpng
* $ clang -lz -lpng16 libpng_test.c
@andycjw
andycjw / uao_decode.py
Last active September 22, 2017 08:24
Big5 UAO decode usage: just do 'import uao_decode.py' unicode_string = big5_string.decode('uao_decode')
import codecs
import struct
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
pass
def decode(self,input,errors='strict'):
unistr = u''
@esskar
esskar / Foo.cpp
Created September 24, 2012 23:22
passing char*[] from c++ dll Struct to c#
#include <stdio.h>
#include <Windows.h>
struct Name
{
char FirstName[100];
char LastName[100];
char *Array[3];
};
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net