Skip to content

Instantly share code, notes, and snippets.

View AlexDev404's full-sized avatar
👾
Ruby2D!

Immanuel Daviel A. Garcia AlexDev404

👾
Ruby2D!
View GitHub Profile
@jamiew
jamiew / google_twunter_lol
Created July 28, 2011 20:34
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@svineet
svineet / Calc.bas
Created September 30, 2012 07:19
QBASIC Code for a simple calculator program
CLS
SCREEN 13
PRINT "CALCULATOR-"
PRINT "ENTER YOUR EXPRESSION"
PRINT "EXAMPLE-58 * 20"
PRINT "THE TERMS SHOULD BE SEPARATED BY SPACE OR ERROR WILL OCCUR"
INPUT "ENTER YOUR EXPRESSION-"; EXP$
EXP$ = EXP$ + " "
@entaq
entaq / Google_oAuth.js
Created November 15, 2012 17:18
Google oAuth 2.0 sample
/**
reference -
https://developers.google.com/accounts/docs/OAuth2WebServer
https://code.google.com/apis/console/
https://developers.google.com/+/api/latest/
**/
////handle all requests here
function doGet(e) {
@markbates
markbates / script.md
Created December 21, 2012 18:21
Getting Started with Sinatra

In an earlier video we took a look at Rack to build incredibly lightweight web applications with Ruby. Rack's toolkit allowed us to quickly throw to get a working application, but we did have to put a little effort into it once we wanted to build something a little more complex.

Sometimes you want a fast and simple framework for building a simple web application. Perhaps you only need to respond to a handful of routes, or you want the response time for a small part of a bigger application to be lighting fast. The Sinatra framework is made for just these moments.

Today let's take a quick look at this framework and see how quickly we can build lightweight web applications.

To get started we first need to install the Sinatra gem:

gem install sinatra
// Put this in a separate .h file (called "getopt.h").
// The prototype for the header file is:
/*
#ifndef GETOPT_H
#define GETOPT_H
int getopt(int nargc, char * const nargv[], const char *ostr) ;
#endif
*/
@seanbuscay
seanbuscay / git_create_orphan.sh
Created June 27, 2013 15:26
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name
@stefafafan
stefafafan / calloc
Created October 12, 2013 04:00
calloc implementation
void *calloc(size_t nmemb, size_t size)
{
char *p;
// If either is zero just return NULL.
if (nmemb == 0 || size == 0)
{
return NULL;
}
@yetithefoot
yetithefoot / stuns
Last active April 2, 2024 10:49 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@infinitylx
infinitylx / file_list_downloader.py
Created April 3, 2014 10:23
Download files from file with list of urls.
import os
import urllib2, posixpath, urlparse
DOWNLOADS_DIR = './mp3'
# For every line in the file
for url in open('list.urls'):
resp = urllib2.urlopen(url)
# Split on the rightmost / and take everything on the right side of that
name = urllib2.unquote(posixpath.basename(urlparse.urlsplit(resp.url).path))