Skip to content

Instantly share code, notes, and snippets.

View alexwybraniec's full-sized avatar

Alex Wybraniec alexwybraniec

View GitHub Profile
@alexwybraniec
alexwybraniec / gist:1648505
Created January 20, 2012 17:15
OSX: How to find out what channels the wireless networks around you are using
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
@alexwybraniec
alexwybraniec / gist:2972487
Created June 22, 2012 12:32
Enabling Memcached graphing in Munin, Ubuntu 10.04 LTS, with munin-node already installed
sudo apt-get update
sudo apt-get install munin-plugins-extra
cd /etc/munin/plugins
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_bytes
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_counters
sudo ln -snf /usr/share/munin/plugins/memcached_ memcached_rates
sudo aptitude install libcache-memcached-perl
sudo /etc/init.d/munin-node restart
sudo tail -f /var/log/munin/munin-node.log
Setup apache status
- sudo a2enmod status
- sudo nano /etc/apache2/conf.d/extendedstatus
- - Paste in 'ExtendedStatus On'
- sudo nano /etc/apache2/sites-available/xxx.com
Paste in...
<VirtualHost *:80>
ServerName status.ws1.xxx.com
ServerAlias status.ws1.xxx.com
@alexwybraniec
alexwybraniec / gist:3418114
Created August 21, 2012 18:21
gmp (git merge pull/push)
(Assuming you are using bash)
nano ~/.bashrc
Add this line to the bottom of your file...
gmp() { git checkout $2 && git pull origin $2 && git merge $1 && git push origin $2 && git checkout $1; }
Usage:
<div class="clearfix" style="width:468px;"><form method="get" action="/"><input type="text" placeholder="Search" name="s" style="float:left;width:300px;"/><input type="submit" value="Go" style="float:left;" class="submit"/></form></div>
@alexwybraniec
alexwybraniec / gist:3755303
Created September 20, 2012 11:23
iOS Games - Sept 2012
The Incident
Fruit Ninja
Angry Birds
Flight Control **
Plants Vs Zombies ***
Bejewelled 2 **
Chu Chu Rocket ***
geoDefense ***
Beneath a Steel Sky **
Monkey Island:SE ***
Intranet
Activity Diagram
ODBC
Martin/Odell
Natural
Sequence Diagrams
MS Internet Information Server 6.0
ASP.net
Linux
Get short link
<a href="javascript:void(function(){var p=$('body').attr('class').match(/postid\-(\d+)/);if(p!=undefined)alert('The shortlink of this post is\n\nhttp://www.dezeen.com/?p='+p.pop());else alert('Post ID not found');})()">Get short URL</a>
Get post id
<a href="javascript:void(function(){var p=$('body').attr('class').match(/postid\-(\d+)/);if(p!=undefined)alert('The id of this post is '+p.pop());else alert('Post ID not found');})()">Get post id</a>
@alexwybraniec
alexwybraniec / gist:5685651
Last active December 17, 2015 22:59
Use the brilliant CasperJS (http://casperjs.org/) library to pulled down extended stats from Vimeo.
//You can grab these using the getUploaded API call
//https://developer.vimeo.com/apis/advanced/methods/vimeo.videos.getUploaded/playground
var vimeo_ids = [ 123, 456, 789 ];
var casper = require('casper').create();
casper.start('https://vimeo.com/log_in');
casper.then(function() {
casper.test.info('Load form');
location = /xmlrpc.php {
deny all;
#Switch off logging
access_log off;
error_log off;
}