Skip to content

Instantly share code, notes, and snippets.

View phun-ky's full-sized avatar
💯
fighting code like a boss

Alexander Vassbotn Røyne-Helgesen phun-ky

💯
fighting code like a boss
View GitHub Profile
@phun-ky
phun-ky / countries.json
Created March 4, 2015 14:11
A JSON list of all (?) countries with country code and calling codes with country names in english and norwegian
[{
"country_en": "Afghanistan",
"code": "AF",
"phonecode": 93,
"country_no": "Afghanistan"
}, {
"country_en": "Albania",
"code": "AL",
"phonecode": 355,
"country_no": "Albania"
# Rename multiple files
# http://www.24hourapps.com/2009/03/linux-tips-10-rename-multiple-files.html
# https://gist.github.com/alobato/397988
#
# Found the orignal gist very helpfull, and tweaked it to fit git mv
# First I suggest you test the outcome before you do the renaming, with a dry run (-n)
for f in $(git ls-files | grep %filestomatch%); do git mv -n "${f}" "${f/%filestomatch%/%newfilename_orlocation%}"; done;
<?php
/**
* File for parsing squid logs
*
* This file fetches lines from the squid log on the squid server and parsing the data to a mysql database
* @link http://phun-ky.net/2007/03/squid-log-parser
* @author Alexander Vassbotn Røyne
* @license Creative Commons, see http://phun-ky.net/license for more information
* @version 1.1
* @name UMedia SquidParser 1.1