This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Random; | |
| public class FindStreaks { | |
| public static void main(String[] args) { | |
| int[] array = new int[Integer.MAX_VALUE/32]; | |
| Random rand = new Random(); | |
| int maxInt = 10000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "testing" | |
| ) | |
| var lockChannel chan bool = make(chan bool, 1) | |
| var lockSync sync.Mutex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| const MALE = 1; | |
| const FEMALE = 0; | |
| $leftFemale = 0; | |
| $rightFemale = 0; | |
| $i = 0; | |
| while (true) { | |
| $frogLeft1 = rand(0,1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| func countGenerator() func() int{ | |
| // state | |
| c := make(chan int) | |
| var i int | |
| // generator | |
| go func(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Interect | |
| { | |
| /** | |
| * Return intersecting array of varargs arrays. | |
| * Compares keys and values. Checks recursively. | |
| * Returns empty array if no intersection. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| OUTPUT=$1 | |
| shift | |
| ffmpeg -f concat -i <( | |
| while [[ $# > 0 ]]; do | |
| printf "file '$PWD/$1'\n" | |
| shift | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FILE=~/speedtestdata | |
| date "+%Y-%m-%d %H:%M" | tee -a $FILE | |
| echo "-----------------------" | tee -a $FILE | |
| ~/dev/speedtest-cli --list | tail -n +3 | head -n8 | while read line; do | |
| echo $line | tee -a $FILE | |
| (~/dev/speedtest-cli --simple --server $(echo $line | sed -e "s/).*/ /g") \ | |
| && echo) \ | |
| | tee -a $FILE | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Slither.io Mods | |
| // @namespace DerpCookiePrograms | |
| // @version 0.1 | |
| // @description Sliter.io Mods | |
| // @author DerpCookiePrograms | |
| // @match http://slither.io/* | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # curl https://gist.githubusercontent.com/.../startopenssh.sh | bash | |
| wget https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz | |
| tar -xvzf docker-latest.tgz | |
| mv docker/* /usr/bin/ | |
| nohup dockerd & | |
| OVPN_DATA="ovpn-data" | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://$(ifconfig | grep -A 5 eth0 | awk -F':' '/inet addr/&&!/127.0.0.1/{split($2,_," ");print _[1]}') | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn sh -c 'echo -e "yes\nblep\n" | ovpn_initpki nopass' | |
| docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn | |
| docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full thecert nopass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Random; | |
| public class MontyHallSimulation { | |
| public static void main(String[] args) { | |
| new MontyHallSimulation().start(); | |
| } | |
| private Random rand = new Random(4); | |