Skip to content

Instantly share code, notes, and snippets.

View kybernetyk's full-sized avatar
💸
0x90

kyb kybernetyk

💸
0x90
View GitHub Profile
#include <stdio.h>
#include <vector>
class Vector2D
{
public:
int getX (void);
void setX (int _x);
Vector2D ();
python for fuckup:
for i in range(1, 5):
print i
bla(i)
//code (intentionally) outside of your for loop
x = x * 5;
if you fuckup your whitespace/tabs in the line with "bla(i);" (line 5)
PYTHON SUCKS!
@kybernetyk
kybernetyk / gist:749179
Created December 20, 2010 23:02
node.js is beautiful like retarded children
var http = require('http');
var sys = require("sys");
var content = "";
var server = http.createServer(function(req, res) {
var connection = http.createClient(80, "api.eveonline.com");
var request = connection.request('GET', "/char/AccountBalance.xml.aspx?characterID=206029291&userid=435410&apikey=70E86A6CFF04D9BBC04E4A08E8082FE2E8BEDD84B6A4CD4A9AE1C72E0B22CD0", {"host" : "api.eve-online.com"});
request.addListener("response", function(response){
var responseBody = "";
response.setEncoding("utf8");
@kybernetyk
kybernetyk / gist:749182
Created December 20, 2010 23:04
i like nodejs more!
#!/usr/bin/env python
import httplib, urllib
params = urllib.urlencode( {
'characterID': 260629291,
'userid': 435411,
'apikey': '70E6A6C6FF04D9BBC04E4A08E8082FE2E8BEDD84B6A4CD4A9AE1C72E0B22CD0',
} )
headers = { "Content-type": "application/x-www-form-urlencoded" }
@kybernetyk
kybernetyk / gist:763311
Created January 3, 2011 09:54
tail .zshrc xD
#
##
setopt auto_pushd
setopt PUSHD_IGNOREDUPS
setopt PUSHD_SILENT
setopt no_beep
@kybernetyk
kybernetyk / gist:777757
Created January 13, 2011 11:52
Everything is by value in C.
#include <stdio.h>
void foo (int *p)
{
printf ("\t1. p is pointing to: %p\n", p);
p = 0;
printf ("\t2. p is pointing to: %p\n", p);
}
@kybernetyk
kybernetyk / xmodmap
Created January 27, 2011 20:41
xmodmap for macbook pro
keycode 51 = numbersign asciitilde
keycode 94 = backslash bar
keycode 11 = 2 quotedbl
keycode 48 = apostrophe at
@kybernetyk
kybernetyk / gist:804875
Created January 31, 2011 21:40
lol simple webzeug
#!/usr/bin/env python
import os
import json
news_items_fmunch = [
{ "text" : "How to play fruit munch ...", "link" : "http://www.minyxgames.com/promos/fmunch_howtoplay.html" },
{"text" : "Welcome to fruit munch!"},
{"text" : "Get the game for free. Read how ...", "link" : "http://www.minyxgames.com/promos/free_fmunch.html"},
{"text" : "New feature: The Full Game!", "link" : "minyxstore://com.minyxgames.fruitmunch.1"},
@kybernetyk
kybernetyk / gist:845512
Created February 26, 2011 19:14
iterator muell
std::vector<int> x;
x.push_back(1);
x.push_back(2);
x.push_back(3);
x.push_back(4);
x.push_back(5);
x.push_back(3);
x.push_back(5);
std::vector<int>::iterator it = x.begin();