Skip to content

Instantly share code, notes, and snippets.

View evasilev's full-sized avatar
🐧

Jenia evasilev

🐧
View GitHub Profile
@eculver
eculver / Auto-refresh bookmarklet
Created January 2, 2010 01:02
Auto-refresh bookmarklet
// origin: http://www.google.com/support/forum/p/Chrome/thread?tid=1a37ccbdde5902fd&hl=en
javascript:
timeout=prompt("Set timeout [s]");
current=location.href;
if(timeout>0)
setTimeout('reload()',1000*timeout);
else
location.replace(current);
function reload(){
@dwiash
dwiash / gist:764969
Created January 4, 2011 16:08
mixcolor.php
<style>
pre{
margin: 0;
padding: 7px 0;
}
</style>
<?php
function rgb2hsv ($RGB)
{
@itechGroup
itechGroup / bitrix_tar.sh
Created April 14, 2011 06:06
Скрипт по упаковке сайта на bitrix для его последующего добавления в систему контроля версий
if test -z $1
then
echo "$0 : You must set a project name"
exit 1
else
if test -d /srv/sites/$1/www/
then
# fix permission issues
echo "fix permissions"
cd /srv/sites/$1/
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@cramforce
cramforce / lyrics.txt
Created October 3, 2011 16:00
I Will Code and JavaScript Will Listen
Artist: https://twitter.com/mandylauderdale
I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
That guy Brendan Eich, did he see my sign
He makes me smile all the time
His lines of code would compliment mine
@otanistudio
otanistudio / chat-frontend.js
Created June 2, 2012 04:45 — forked from martinsik/chat-frontend.js
Node.js chat server, with the frontend changed to use BackboneJS
/*global $, Backbone, window, console, WebSocket, _ */
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var $content = $('#content')
, $input = $('#input')
, $status = $('#status')
// my color assigned by the server
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 7, 2024 07:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mwhite
mwhite / commcare-ubuntu-install.sh
Created September 27, 2012 04:22
Install dependencies and set up databases for CommCare HQ on Ubuntu 12.04
DBNAME="foodb"
# This script installs dependencies for CommCare HQ on Ubuntu 12.04 (Java,
# Jython, couchdb, couchdb-lucene, less, uglifyjs, and various python packages)
# and sets couchdb and couchdb-lucene up to automatically run on startup. It
# also creates postgres (user 'django', pass 'django') and couchdb databases
# named according to $DBNAME as specified above.
# Before running, you must download the following files to the script's
# directory:
@oranj
oranj / url2ascii.php
Last active December 15, 2015 14:08
#!/usr/bin/php
<?php
/**
* Calibration: depending on your fonts and terminal colors, you may want to change these
*/
global $PIXELS, $COLORS, $HSV_COLORS;
$YSCALE = 12;
$XSCALE = 5;
@Dygear
Dygear / gist:6291550
Created August 21, 2013 08:00
NTLMv2 Authentication with nginx.
<?php
define('PROXY', 'proxy');
define('PORT', 8080);
if (!function_exists('getallheaders'))
{
function getallheaders()
{
$headers = [];