Skip to content

Instantly share code, notes, and snippets.

View bialikover's full-sized avatar

Adán G. Galván González bialikover

View GitHub Profile
@bialikover
bialikover / coresesvapp.js
Created February 8, 2012 02:43
a little snippet to fetch events in fb
var time = new Date();
FB.api("/fql",{q:
{'query0':'SELECT uid2 from friend WHERE uid1 = me() LIMIT 2',
'query1':'SELECT eid from event_member WHERE uid IN (SELECT uid2 FROM #query0) AND rsvp_status="attending"',
'query2':'SELECT eid, name, description, location, venue, start_time FROM event WHERE eid IN (SELECT eid FROM #query1)' //request solo el primer amigo para fines practicos
}},
function(response){
var events= response.data[2].fql_result_set;
for (var i = 0; events.length > i ; i++){
t = new Date(events[i].start_time * 1000);
@bialikover
bialikover / gist:1765706
Created February 8, 2012 05:21
siempre es jueves Completo... pero en raw
<html>
<head>
<title>Siempre es jueves</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<div id="fb-root"></div>
<script>
var time = new Date();
window.fbAsyncInit = function() {
@bialikover
bialikover / gist:1770724
Created February 8, 2012 16:02
con mapa
<html>
<head>
<title>Siempre es jueves</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyB6Ci719_dZPKFs8mAHCQSwUyUfLWuQItI&sensor=true">
</script>
<style> #map_canvas{ margin-top: 5%; height:70%; width:100%; }</style>
</head>
<body onload="initialize()">
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ls=2 " Allways show status line
set hlsearch " Highlight searches
set ruler " Show the cursor position all the time
set visualbell " Turn off error beep/flash
set ignorecase " Ignore case while searching
set number " Put numbers on side
set so=7 " Set 7 lines to the cursor when movin j/k
@bialikover
bialikover / .bash_profile
Last active October 6, 2015 13:47
bash profile.... / .profile
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib
HISTTIMEFORMAT="%d/%m/%y %T "
alias sublime='open -a "Sublime Text 2"'
PS1="[\u \d \A \W] $"
COUNTER=0
while [ $COUNTER -lt 10 ]; do
echo The counter is $COUNTER
let COUNTER=COUNTER+1
done
@bialikover
bialikover / colors for git terminal
Created October 13, 2012 21:02
enable git colors
git config --global --add color.ui true
<div role="main">
<div id="content" class="container">
<h1>Completa tu perfil</h1><hr>
<?php if (isset($error)):?>
<div class="alert alert-notice">
<h4>Muy mal!</h4>
<?php echo $error;?>
</div>
<?php endif;?>
@bialikover
bialikover / sinatravicky
Last active December 20, 2015 07:19
sinatra
require 'rubygems'
require 'mysql2'
require 'sinatra'
require 'json'
@@mysqlclient = Mysql2::Client.new(:host => "wordpress.csabgekyveu2.us-west-2.rds.amazonaws.com", :username => "vdigitalRoot", :password => "vd1g1t4lR00t", :database => "bitnami_wordpress")
get '/' do
"Hello world, it's #{Time.now} at the server!"
end
get '/tables/' do
res = Array.new
@bialikover
bialikover / sublimeConf
Created November 14, 2013 02:21
sublime config
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"font_size": 12.0,
"ensure_newline_at_eof_on_save": true,
"trim_trailing_white_space_on_save": true,
"rulers": [79],
"tab_size": 2,
"translate_tabs_to_spaces": true,
"ignored_packages":
[