Skip to content

Instantly share code, notes, and snippets.

View allanlaal's full-sized avatar

Allan Laal allanlaal

View GitHub Profile
@iiska
iiska / Nettiradiot.m3u
Created June 6, 2009 11:02
Lähes kaikki Suomalaisten radioasemien nettiradiot.
#EXTM3U
#EXTINF:0,Bassoradio
http://83.145.201.209:8000/
#EXTINF:0,Classic Radio
http://217.30.180.242:8000/clsr.ogg
#EXTINF:0,Groove FM
http://217.30.180.242:8000/gvfm.ogg
@mncaudill
mncaudill / php-quine.php
Created December 21, 2010 05:19
This is a PHP quine. When run, this program will print out an exact version of itself.
<?php
$data = array(
36,110,108,32,61,32,99,104,114,40,49,48,41,59,10,112,114,105,110,116,32,34,60,63,112,104,112,36,110,108,36,110,108,92,36,100,97,116,97,32,61,32,97,114,114,97,121,40,36,110,108,34,59,10,10,102,111,114,101,97,99,104,40,36,100,97,116,97,32,97,115,32,36,100,41,32,123,10,32,32,32,112,114,105,110,116,32,34,36,100,44,34,59,32,32,10,125,10,10,112,114,105,110,116,32,34,36,110,108,41,59,36,110,108,36,110,108,34,59,10,10,102,111,114,101,97,99,104,40,36,100,97,116,97,32,97,115,32,36,100,41,32,123,10,32,32,32,32,112,114,105,110,116,32,115,112,114,105,110,116,102,40,34,37,99,34,44,32,36,100,41,59,10,125,10,
);
$nl = chr(10);
print "<?php$nl$nl\$data = array($nl";
foreach($data as $d) {
@rmccue
rmccue / toggl.php
Created January 10, 2011 07:35
A Toggl API client class for PHP
<?php
/**
* Toggl API Client
*
* A somewhat unfinished client for the Toggl API.
*
* Copyright (c) 2010 Ryan McCue
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@jbhannah
jbhannah / dropbox-setup.sh
Created May 23, 2011 03:51
Dropbox setup on a headless Ubuntu Server (http://wp.me/pnbL6-5F)
#!/bin/sh
# Dropbox setup on a headless Ubuntu Server
# Script written by Jesse B. Hannah (http://jbhannah.net) <jesse@jbhannah.net>
# Based on http://wiki.dropbox.com/TipsAndTricks/UbuntuServerInstall
###
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@pksunkara
pksunkara / config
Last active May 22, 2024 13:43
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@andyedinborough
andyedinborough / jquery.oauth.js
Created June 7, 2011 19:30
Introduces $.oauth() to make using OAuth from jQuery as easy as using $.ajax()
(function (window, document, $, undefined) {
if (!$.Deferred) throw 'jQuery 1.5 is required to use the jQuery.oauth script!';
function require(name, url) {
if (window[name] === undefined)
return $.ajax({ type: 'GET', cache: true, dataType: 'script', url: url });
}
$.oauth = function (options) {
var d = $.Deferred();
@adhipg
adhipg / countries.sql
Created January 12, 2012 11:41
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@benhedrington
benhedrington / dropbox
Created April 10, 2012 01:06
Dropbox init.d
#!/bin/sh
# dropbox service
# Replace with linux users you want to run Dropbox clients for
DROPBOX_USERS="user1 user2"
DAEMON=.dropbox-dist/dropbox
start() {
echo "Starting dropbox..."
for dbuser in $DROPBOX_USERS; do
@mkdizajn
mkdizajn / magento local.xml override stores base url
Last active January 10, 2017 11:02
magento local.xml override stores base url
<config>
<global>
<!-- ... -->
</global>
<stores>
<default>
<web>
<unsecure>
<base_url>http://beispiel.tld/shop/</base_url>
</unsecure>
@renekreijveld
renekreijveld / joomlaupdate
Last active September 17, 2021 13:12
This bash script will update your Joomla 2.5/3.1 website to the latest Joomla version. It does this by automatically downloading the correct update zipfile from Joomla.org. The script also executes the sql update commads (if needed). If specified joomlaupdate will make a backup of your website and database before updating. Joomlaupdate can also …
#!/bin/sh
# joomlaupdate
# Updates your Joomla 2.5/3.1 website to the latest version.
#
# Usage: joomlaupdate [-s] [-b] [-h] [-l]
#
# Default action is verbose on, no backup.
# -s Silent. Do not display any informational messages.
# -b Backup. Create a backup before updating.