View RandomAccessFIFA.md
# Patric Elton Result
1 Wisła Kraków Manchester City 2 - 5
2 NY Red Bulls Gil Vicente 2 - 3
3
4
5
6
7
8
View csgo_buynds.cfg
// CS:GO buynds
// Keeping it simple to avoid misbuys
// If I want to buy something else I first purchase armor, kit etc. then manually buy that weapon.
//
// Put this in your "csgo/cfg/autoexec.cfg"
//
// =======================
// NUMPAD
// =======================
// 0 = Vest+Helm or Vest only
View addkey.sh
#!/bin/sh
KEY="$HOME/.ssh/id_rsa.pub"
if [ ! -f $KEY ];then
echo "Private key not found at $KEY"
echo "* please create it with "ssh-keygen -t rsa" *"
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *"
exit
fi
View fib.js
var fib = function (n) {
var i,
fn = 0,
f1 = 0,
f2 = 1;
if (n < 2) return n;
for (i = 2; i <= n; i++) {
fn = f1 + f2;
View array_inversion.js
/*
* Count inversions in an array using JavaScript
* Friday fun writing algorithms as UNREADABLE CODE WITH FEW LINEZ FTW :D::D
*/
var array_inversions = function (A) {
var I = 0,
R = function (A) { return (A.length < 2) ? A : M(R(A.splice(0, A.length/2)), R(A)) },
M = function (B, C) {
var D = []
View gist:1817251
# Find files > 20MB
find . -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
# Find directories >= 1GB
du -h . | grep ^[0-9.]*G
View index.js
/**
* Written in Node.js
* http://nodejs.org
*
* Author: Patric Nordmark
*
* Usage: node index.js [-t [n]] [<input file>] [<output file>]
*
* Running node index.js without any parameters will solve all
* test cases in input.txt and write the results to output.txt
View gcd.js
// JavaScript: Greatest Common Divisor
var gcd = function (n, m) {
var r = 0;
while (n !== 0) {
r = m % n;
m = n;
n = r;
}
return m;
};
View magento-backup.py
# Automation script for: http://www.magentocommerce.com/wiki/groups/227/moving_magento_to_another_server
# Author: patric.nordmark@frojd.se
#
# usage: magento-backup.py [-h] -m path [-d path] [--theme theme]
# [--package package] [--db-name database]
# [--db-host hostname] [--db-user username]
# [--db-password password]
#
# Backup only the necessary Magento data for exporting a site.
#