This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sw/bin/python2.7 | |
# This is a demonstration script for Facebook Chat | |
# using the X-FACEBOOK-PLATFORM SASL mechanism. | |
# It requires pyfacebook and pyxmpp to be installed. | |
# This client only works for desktop applications (configured in the | |
# developer app), and uses the old-style auth.getSession mechanism to get a | |
# Facebook session. For newer-style or web apps, only the | |
# 'get_facebook_client' function should have to change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys, os, threading | |
def get_facebook_client(): | |
import facebook | |
# Replace these with your app's credentials | |
api_key = '147201912033054' | |
secret_key = '61ef5734be20d29715ef1133e9456834' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} ^system.* | |
RewriteRule ^(.*)$ /index.php/$1 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond $1 !^(index\.php|images|robots\.txt|css) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = Array.new | |
hash = {:file1 => [:lib1, :lib2, :lib3], :file2 => [:lib4, :lib5, :lib6]} | |
hash.each do |key, val| | |
a.push *val | |
a.push key | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Route urls | |
*/ | |
class Router { | |
function __construct($query_str) { | |
$this->url_str = $_GET['route']; //Get end of url | |
$this->qtokens = explode('/', string); //get tokens split at '/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RPool | |
attr_accessor :max_size | |
attr_reader :workers | |
def initialize(max_size = 128) | |
@max_size = max_size | |
@workers = Array.new | |
@mutex = Mutex.new | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URxvt.font: xft:terminus:pixelsize=12:antialias=true | |
urxvt*scrollBar: false | |
urxvt*termName: rxvt-256color | |
urxvt*resizehints: True | |
URxvt.keysym.Shift-Control-V: perl:clipboard:paste | |
URxvt.iso14755: False | |
URxvt.perl-ext-common: default,clipboard | |
!black.normal : xoria256.LineNr.guibg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
require("awful") | |
require("awful.autofocus") | |
require("awful.rules") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
vicious = require("vicious") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bigPipe.onPageletArrive({ | |
"content": { | |
"pagelet_sidebar": { | |
"container_id": "ubu35dj60" | |
} | |
}, | |
"jsmods": { | |
"instances": [ | |
["m315515_66", ["ScrollableArea", "m315515_65"], | |
[{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void isort(int* arr, int len) { | |
int i, j; | |
for(i = 1; i < len; i++) { | |
int temp = arr[i]; | |
for(j = i; j > 0; j--) { | |
if(arr[j] < arr[j - 1]) { | |
int temp2 = arr[j]; |
OlderNewer