Skip to content

Instantly share code, notes, and snippets.

View dimzon's full-sized avatar

Dmitry dimzon

  • Wintegra
  • Russian Federation
View GitHub Profile
@chenshaoju
chenshaoju / Disable_IPv6.sh
Created December 28, 2017 12:38
Disable IPv6 for Android in init.d
#!/system/bin/sh
#
echo 0 > /proc/sys/net/ipv6/conf/default/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 0 > /proc/sys/net/ipv6/conf/wlan0/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
sleep 3
echo 0 > /proc/sys/net/ipv6/conf/default/accept_ra
@shaosh
shaosh / underscoreToCamelCase.cs
Created October 7, 2016 00:39
C# code to convert underscore name to camelcase
private string underscoreToCamelCase(string name)
{
if (string.IsNullOrEmpty(name) || !name.Contains("_"))
{
return name;
}
string[] array = name.Split('_');
for(int i = 0; i < array.Length; i++)
{
string s = array[i];
@paulirish
paulirish / bling.js
Last active July 23, 2024 14:51
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
--------------------------------------------------------
-- get a list of arguments for specifed stored procedure
--------------------------------------------------------
SELECT
argument_name,
in_out,
data_type
FROM
all_arguments
WHERE
@P7h
P7h / show-ip-address.sh
Last active December 21, 2015 15:48
For showing IP Address before the login prompt on Ubuntu env. Copy the following script to /etc/network/if-up.d/ and /etc/network/if-post-down.d/ folders. And don’t forget to mark them as executables.
# This shell script displays hostname and IP Address of the Ubuntu machine before the login prompt.
# Add this file to '/etc/network/if-up.d/' and '/etc/network/if-post-down.d/' folders and mark them as executables.
# Display Ubuntu default information [the current version of Ubuntu].
cat /etc/issue.net > /etc/issue
# Display the hostname.
hostname >> /etc/issue
# Display the IP Address of eth0.
@andreyvit
andreyvit / Delegate-README.txt
Created November 29, 2012 07:18
Delegate-README
В этой директории лежит delegate (универсальный прокси-сервер и сервер
контекта) для Windows. Остальные версии можно найти на сайте.
Вот примерный список функций:
* входящие (т.е. с вашего компьютера) соединение по протоколам
HTTP, HTTPS, "HTTPS-tunnel", FTP, NNTP, Telnet, SOCKS и др.
* исходящие соеднинения (т.е. к настоящим серверам) по тем же
протоколам, причём, например, можно FTP (на входе) пустить
через SOCKS-прокси (или через HTTPS-прокси)
* кэширование запросов (с управляемыми параметрами)
@automatonic
automatonic / MurMurHash3.cs
Created September 14, 2012 22:46
MurMurHash3 .Net (C#) implementation
/*
This code is public domain.
The MurmurHash3 algorithm was created by Austin Appleby and put into the public domain. See http://code.google.com/p/smhasher/
This C# variant was authored by
Elliott B. Edwards and was placed into the public domain as a gist
Status...Working on verification (Test Suite)
Set up to run as a LinqPad (linqpad.net) script (thus the ".Dump()" call)
*/
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 26, 2024 07:44
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@indication
indication / .gitignore
Created October 19, 2011 17:26
TimSort C# version
/obj
/bin
*.suo
*.user
@greut
greut / run.php
Created April 30, 2011 18:18
A web server in pure PHP (non-concurrent and concurrent)
#!/usr/bin/env php
<?php
$app = function($request) {
$body = <<<EOS
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<title>Hello World!</title>