Skip to content

Instantly share code, notes, and snippets.

View alfanick's full-sized avatar
💭
I may be slow to respond.

Amadeusz Leonardo Juskowiak alfanick

💭
I may be slow to respond.
View GitHub Profile
#include <iostream>
#include <windows.h>
#define W_SIZE 50
#define H_SIZE 40
#define TIME 10
using namespace std;
enum stan { ZYWY, MARTWY };
#include <iostream>
#include <windows.h>
#define W_SIZE 24
#define H_SIZE 79
#define TIME 300
using namespace std;
enum stan { ZYWY, MARTWY };
@alfanick
alfanick / lrbackup.rb
Created December 28, 2009 20:05
Simple script which helps backuping Lightroom catalog
#!/usr/local/bin/ruby
require 'fileutils'
require 'ftools'
MKISOFS_BIN = '/opt/local/bin/mkisofs'
module Lightroom
class Backup
attr_accessor :catalog
#include <iostream>
#include <algorithm>
using namespace std;
void kmp(string siano, string igla)
{
int P[igla.size()], t = 0, j = 0, i = 1;
P[0]=0; P[1]=0;
$ gem list
** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.0.beta3)
actionpack (3.0.0.beta3)
activemodel (3.0.0.beta3)
activerecord (3.0.0.beta3)
activeresource (3.0.0.beta3)
activesupport (3.0.0.beta3)
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define abs(x) (x>0?x:-x)
double f(double x)
{
int ws = 640;
int st = 20;
int ed = 1;
int sd = 10;
void setup() {
size (ws, ws);
noStroke();
}
@alfanick
alfanick / quotes.sh
Created June 6, 2011 19:57
Random quotes from Forismatic
#!/bin/bash
curl "http://api.forismatic.com/api/?method=getQuote&lang=en&format=text" | sed -e 's/(/\
\
/g' | sed -e 's/ )//g' | sed -e 's/)//g'
PALETTE pal;
PACKFILE *file;
/* Open file */
file = pack_fopen(filename, "rb");
if (!file) some_error_func();
/* Read header before palette ... */
/* ... Some header reading code here ;) */
/* Read palette */
pack_fread(&pal, 1024, file);
require "sinatra"
get '/' do
'Hello world!'
end
get '/hello/:name' do
"Hello #{params[:name]}"
end