Skip to content

Instantly share code, notes, and snippets.

View hauleth's full-sized avatar
⌨️
Click! Clack!

Łukasz Jan Niemier hauleth

⌨️
Click! Clack!
View GitHub Profile
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <algorithm>
using namespace std;
struct SProstokat {
unsigned int wysokosc, szerokosc;
};
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
void menu()
{
cout << "\tKOLKO I KRZYZYK"<<endl;
cout << "Wcisnij:\n1. Wprowadz graczy\n2. GRA\nx. Koniec\n\n";
cout << "\tSTRUKTURA"<<endl;
@hauleth
hauleth / 2d.c
Created December 10, 2012 11:35
Task with generating 2D array
int **a, i, j;
a = (int**)malloc(m*sizeof(int*));
for (i = 0; i < m; i++)
a[i] = (int*)malloc(n*sizeof(int);
class Player < Competitor
belongs_to :team
attr_accessible :birth_date, :nationality
def age
now = Time.now.utc.to_date
now.year - birth_date.year - ((now.month > birth_date.month || (now.month == birth_date.month && now.day >= birth_date.day)) ? 0 : 1)
end
@hauleth
hauleth / rbenv.fish
Last active December 15, 2015 23:09
My fish function file for `rbenv` (require `rbenv-whatis` plugin for all features) :) Happy hacking.
function rbenv_shell
set -l vers $argv[1]
switch "$vers"
case '--complete'
echo '--unset'
echo 'system'
command rbenv versions --bare
return
case '--unset'
set SEGMENT_SEPARATOR '⮀'
set SEGMENT_BG
set RSTATUS
# Create segment of prompt
function prompt_segment
set -l bg $argv[1]
set -l fg $argv[2]
[ (count $argv) -gt 2 ]; and set -l content $argv[3..-1]
@hauleth
hauleth / Gemfile
Last active December 19, 2015 04:09 — forked from amscotti/mongo_urlshortener.rb
Simple Sinatra + Mongoid URL shortener (untested)
source 'https://rubygems.org'
gem 'sinatra'
gem 'slim'
gem 'mongoid'
gem 'bson_ext'
@hauleth
hauleth / test.json
Last active December 29, 2015 04:19
{
"machines": [
{
"maintenances": [
{ "start": 10, "duration": 10 },
{ "start": 50, "duration": 10 },
]
}
],
"tasks": [
#!/bin/sh
SEP=
SEPE=
CLOCK=⌚
CALENDAR=☼
MUSIC=♫
WIDTH=${1}