Skip to content

Instantly share code, notes, and snippets.

View siraj's full-sized avatar
💭
I may be slow to respond.

Siraj Razick siraj

💭
I may be slow to respond.
View GitHub Profile
@siraj
siraj / text-handler.js
Created August 30, 2011 23:18
text handler
const Tp = imports.gi.TelepathyGLib;
function message_received_cb(channel, msg)
{
print ("message recived : " + msg.to_text());
channel.ack_message_async(msg, function fake (a, b, c){});
var buble = document.getElementById("chatbox");
buble.innerHTML = buble.innerHTML + String("<p class=\"lemon\">" + msg.to_text() + "</p>");
@siraj
siraj / build-essential.sh
Created November 28, 2011 05:56 — forked from henry0312/build-essential.sh
Build m4, autoconf, automake, libtool on Mac OS X Lion
#!/bin/sh
# 初期設定
WORK=$HOME/Builds/build-essential
PREFIX=$HOME/local
export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ソースコードのダウンロード
if [ ! -d $WORK/src ] ; then
mkdir src
@siraj
siraj / getscreenshot.c
Created November 6, 2012 07:15 — forked from bellbind/getscreenshot.c
[c][gtk][webkit]get screenshot PNG from web page
/*
* get screenshot PNG from web page
*
* build:
* FLAGS=`pkg-config --cflags --libs gtk+-x11-2.0 glib-2.0 webkit-1.0`
* gcc -Wall $FLAGS getscreenshot.c -o getscreenshot
*
* usage:
* /usr/bin/xvfb-run -s "-screen 0 1024x768x24" ./getscreenshot test.html
*
@siraj
siraj / getscreenshot.c
Created November 6, 2012 07:15 — forked from bellbind/getscreenshot.c
[c][gtk][webkit]get screenshot PNG from web page
/*
* get screenshot PNG from web page
*
* build:
* FLAGS=`pkg-config --cflags --libs gtk+-x11-2.0 glib-2.0 webkit-1.0`
* gcc -Wall $FLAGS getscreenshot.c -o getscreenshot
*
* usage:
* /usr/bin/xvfb-run -s "-screen 0 1024x768x24" ./getscreenshot test.html
*

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@siraj
siraj / gist:eb0505149452bc0caca1
Created February 12, 2015 23:15
plexydesk-indent-style
astyle_args="--indent=spaces=2 --style=linux --add-brackets \
· --indent-labels --pad-header --pad-oper --unpad-paren \
· --keep-one-line-blocks --convert-tabs \
· --indent-preprocessor --align-pointer=name"

Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4)

by Keith Rosenberg (netpoetica)

Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.

1) Get the v8 source

git clone https://github.com/v8/v8.git

2) Install depot tools

@siraj
siraj / build_cross_gcc
Last active September 20, 2015 19:25 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@siraj
siraj / thinkpad-trackpoint-speed.mkd
Created January 31, 2016 07:57 — forked from noromanba/thinkpad-trackpoint-speed.mkd
change pointer speed of Trackpoint on Thinkpad T60

Thinkpad Trackpoint speed configuration on Linux

change pointer speed of Trackpoint on Thinkpad

works well T60 with Ubuntu 13.10 and Ubuntu 14.04 LTS

how to change

speed configration by write integer to file

0 <- slower ------------ faster -> 250

@siraj
siraj / goaccess.py
Created November 8, 2016 09:11 — forked from nagyv/goaccess.py
A python script for downloading and processing Amazon S3 logs using goaccess
#!/bin/python
import os
from boto.s3.connection import S3Connection
import subprocess
from datetime import datetime, date
import argparse
import tempfile
import json
parser = argparse.ArgumentParser(description="Downloads logs from S3, and parses them with goaccess.")