./error-generator 8080
go to localhost:8080/PATH
| #include <linux/init.h> | |
| #include <linux/module.h> | |
| #include <linux/proc_fs.h> | |
| #include <linux/string.h> | |
| #include <linux/cred.h> | |
| #include <linux/fs.h> | |
| //typesafe macro for getting minimum value | |
| #define MIN(a,b) \ | |
| ({ typeof (a) _a = (a); \ |
| #!/usr/bin/env ruby | |
| # Usage: __FILE__ number_of_passwords words_in_password | |
| # | |
| # https://xkcd.com/936/ | |
| # This method is great, but people tend to chose only | |
| # certain subset of words. This is solution. | |
| # | |
| # Generate set of X passwords and choose one. | |
| # | |
| # To dump dictionary (change pl to preferred language): |
| #!/bin/sh | |
| DIR=$(dirname "$0") | |
| CONF=$1.conf | |
| cd $DIR | |
| if [ ! -f $CONF ]; then | |
| echo "Unknown VPN $1!" | |
| exit 1 |
| #!/bin/bash | |
| NAME=servergroupnameororganization | |
| URL1=http://test.com | |
| URL2=http://example.com | |
| UPTIME=`cat /proc/uptime |grep -E -o '^[0-9]*'` | |
| UPTIME_SEC=$((UPTIME%60)) | |
| UPTIME=$((UPTIME/60)) | |
| UPTIME_MIN=$((UPTIME%60)) | |
| UPTIME=$((UPTIME/60)) |
./error-generator 8080
go to localhost:8080/PATH
| implicit def toPredicate[T](predicate: T => Boolean) = | |
| new Predicate[T]() {def `match`(entry: T): Boolean = {predicate(entry)}} | |
| class RichObjectSet[T](objectSet:ObjectSet[T]) extends Iterator[T] { | |
| def hasNext:Boolean = objectSet.hasNext() | |
| def next:T = objectSet.next() | |
| } | |
| implicit def toRichObjectSet[T](objectSet: ObjectSet[T] ) = |
| #PI 1 + 1000 numbers | |
| p -4*(0..10**9).inject{|r,e|r+(10**1000*(-1)**e/(2*e-1))} | |
| #E 1 + 1000 numbers | |
| p (1..10**3).inject(0){|r,e|r+(e==1?2:1)*(10**1000)/(1..e).inject{|r,e|r*e}} |
| #!/usr/bin/env ruby | |
| require 'net/http' | |
| require 'uri' | |
| #set those varibles to your personal info | |
| pesel = XXXXXXXXXX | |
| imie = 'John' | |
| nazwisko = 'Doe' | |
| wait = 3600 #seconds | |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'open-uri' | |
| require 'RMagick' | |
| pixel = [Magick::Pixel.new(0, 0, 0)] | |
| path = open('http://www.pythonchallenge.com/pc/return/cave.jpg', :http_basic_authentication => ["huge", "file"]).path | |
| cat = Magick::ImageList.new(path).first | |
| cat.columns.times do |column| | |
| cat.rows.times do |row| |