Skip to content

Instantly share code, notes, and snippets.

View pstachula-dev's full-sized avatar
👾

Paweł Stachula pstachula-dev

👾
View GitHub Profile
// ==UserScript==
// @name GreenIsBad
// @namespace GreenIsBad
// @version 0.2
// @description Ukrywa wpisy/komentarze zielonek za spojlerami
// @author Feuer
// @match http://wykop.pl/*
// @match http://www.wykop.pl/*
// @grant none
// ==/UserScript==
@pstachula-dev
pstachula-dev / gist:efeac9b65ec1f554010a
Last active August 29, 2015 14:11
.gitignore delete files from the remote repository Git

.gitignore: vendor/*

Bash: git rm --cached vendor -r

// Source http://www.thatjsdude.com/interview/js1.html
/*
|--------------------------------------------------------------------------
| Log p()
|--------------------------------------------------------------------------
|
*/
var p = function(a) {
@pstachula-dev
pstachula-dev / gist:9089169
Last active August 29, 2015 13:56
Bash_profile
# Aliases
# Navigation
alias ll='ls -alhF'
alias ls='ls -alhFG --color'
alias l='ls -lhFG --color'
alias md="mkdir -pv"
alias ~='cd ~'
alias ..='cd ..'
alias ...='cd ../..'
@pstachula-dev
pstachula-dev / vim
Last active August 29, 2015 13:56
Vim cheat sheets
1. Useful Commands
gg - jump to begining of file
G - jumo to end of file
{ - jump to paragraph
i - insert mode
a - insert mode after cursor
o - insert in new line below and swtich to insert mode
O - insert in new line above and swtich to insert mode
r - change letter
x - delele character
#!/usr/bin/ruby
require 'benchmark'
require 'set'
$VERBOSE = nil
H = 'md'
N = 10
Size = 3
# H ='md'
require 'Benchmark'
class Sudoku
attr_accessor :puzzle
def initialize
@puzzle = ''
@game = Array.new(9)
@game.map! { Array.new(9) }
9.times do |i|
@pstachula-dev
pstachula-dev / gist:7290370
Last active December 27, 2015 07:39
Sandbox
#!/usr/bin/ruby
require 'timeout'
class Sandbox
def initialize(tar, time)
@tar = tar
@time = time
@path = get_main_folder_name
@app_map = {
@pstachula-dev
pstachula-dev / gist:6498638
Created September 9, 2013 17:11
SDiZO, lab6 Drzewo AVL (usuwanie)
#include<iostream>
#include<time.h>
using namespace std;
struct avl_node
{
avl_node *left, *right, *p;
int key, bf;
};
class AVL
@pstachula-dev
pstachula-dev / gist:6498633
Created September 9, 2013 17:10
SDiZO, lab5 Drzewo AVL (dodawanie)
#include<iostream>
#include<time.h>
#include<vector>
using namespace std;
int n;
struct drzewo{
int key,balance;