Skip to content

Instantly share code, notes, and snippets.

@inazt
inazt / FB.Event.Count.Comments.js
Created November 2, 2010 06:40
FB.Event.Count.Comments
/**
* Using Graph API
**/
FB.api('/134478319934542/feed?limit=9999', function(data) {
console.log(data.data.length)
$('body').html('');
var line;
var uid;
FB.Array.forEach(data.data, function(resp) {
if(resp.likes > 20) {
@inazt
inazt / gist:636862
Created October 20, 2010 17:19
jquery.facebook.each.forEach.js
FB.Array.forEach(album_detail, function(i, v) { console.log(i, v); });
jQuery.each(album_detail, function(i, v) { console.log(i, v) })
From a7add60561ba31e4f18eee5cbf62404cc9ebc18e Mon Sep 17 00:00:00 2001
From: Nat <[email protected]>
Date: Sun, 10 Oct 2010 17:44:02 +0700
Subject: [PATCH] Initial django project
---
manage.py | 11 +++++++
settings.py | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
urls.py | 16 ++++++++++
3 files changed, 123 insertions(+), 0 deletions(-)
jQuery.post("/facebookapp/tgNotifier/postToPage.php", {a:'aa', b:'bb'},
function(data){
console.log(data);
});
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>See own Albums with big photos</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
$(document).ready(function() {
@inazt
inazt / service.groovy
Created September 3, 2010 10:53 — forked from pphetra/service
Grails Service ZeroMQ
import org.springframework.beans.factory.InitializingBean
import org.zeromq.ZMQ
class ParseService implements InitializingBean {
def pullSocket
def pubSocket
def running = true
def pollingRate = 200
@inazt
inazt / url-shorten-generator.php
Created July 23, 2010 21:40
url-shorten-hash-generator
<?php
function getHash() {
$base=1000000;
$result = db_query_range('SELECT max(nid)+1 as nextId from {personal}', 0, 1);
$offset= db_fetch_object($result)->nextId;
$number=$base+$offset;
$out = "";
$codes = "abcdefghjkmnpqrstuvwxyz23456789ABCDEFGHJKMNPQRSTUVWXYZ";
while ($number > 53) {
@inazt
inazt / siamensis_logoutblock.php
Created July 20, 2010 06:36
siamensis_logoutblock.php #
<?php
?>
<script type="text/javascript">
function test() {
var selected = $("#shortcut-menu-id option:selected");
var output = "";
if(selected.val() != 0){
/* $Id: style.css,v 1.1.2.9 2009/05/22 08:46:11 jmburnz Exp $ */
/**
* @file style.css
*
* Use this file to override the Genesis core modular styles
* (such as the HTML elements in typography.css), module CSS
* and other Drupal styles. Anything that doesn't fit logically
* into page.css, nodes.css, blocks.css or comments.css can go here.
*/
<?php
function genesis_siamensis_preprocess_page(&$vars, $hook) {
if(empty($vars['section_class'])) {
$section = 'front_page';
$vars['section_class'] = 'class="body front_page '. safe_string('section-'. $section) .'"';
}
}
?>