This file contains 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
alias hello='echo hello' | |
alias l1='ls -1' | |
alias lll='ls -ltr' | |
alias rmr="rm -r" | |
alias rm.="rm -r \$(pwd); cd .." | |
alias grepcode='grep -rnI' | |
alias dclear='clear && clear' | |
alias ~='cd ~' |
This file contains 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 com.maanoo.kickassist; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.nio.file.Files; | |
import java.nio.file.StandardCopyOption; | |
import java.util.Scanner; | |
/** | |
* Check and upgrades to a new version. |
This file contains 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
function random_password(length) { | |
var characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var password = ""; | |
for (var i = 0; i < length; i++) { | |
var random_float = Math.random(); | |
password += characters.charAt(Math.floor(random_float * characters.length)); | |
} |
This file contains 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
// run with: | |
// g++ --std=c++14 -O3 eucl_variations.cpp && ./a.out && rm a.out | |
// output: | |
// 12139783 | |
// 7026125 | |
// 5667812 | |
// 12146435 | |
// 7126185 |
This file contains 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
application/javascript | |
application/x-javascript | |
application/ecmascript | |
application/json | |
application/xml | |
This file contains 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
/////////////////////////////////////////////////////////////////////////////// | |
#ifndef _SKIPLIST_H_ | |
#define _SKIPLIST_H_ | |
#include <iostream> | |
#include <sstream> | |
/////////////////////////////////////////////////////////////////////////////// |
This file contains 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
/** | |
* Moves a given path form a folder to an other. | |
*/ | |
public static Path movePath(Path path, Path from, Path to) { | |
return to.resolve(from.relativize(path)); | |
} |
This file contains 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/sh | |
name=$(date '+%y-%m-%d-%H-%M') | |
systemd-analyze plot > ~/Documents/Boots/$name.svg | |
systemd-analyze > ~/Documents/Boots/$name.txt | |
systemd-analyze critical-chain >> ~/Documents/Boots/$name.txt | |
systemd-analyze blame >> ~/Documents/Boots/$name.txt |
This file contains 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/sh | |
# Use like this: | |
# | |
# minify-js.sh < app.js > app.min.js | |
# | |
curl -s \ | |
-d compilation_level=SIMPLE_OPTIMIZATIONS \ | |
-d output_format=text \ |