Skip to content

Instantly share code, notes, and snippets.

@meonkeys
meonkeys / skype-notify.py
Created August 22, 2012 17:26 — forked from nzjrs/skype-notify.py
Python script to make Skype co-operate with GNOME3 notifications
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#
@meonkeys
meonkeys / FacebookSessionPersistence.php
Created September 24, 2012 19:18 — forked from MattKetmo/FacebookSessionPersistence.php
Quick (and dirty) fix for running tests using FosFacebookBundle
<?php
namespace Foo\BarBundle\Facebook;
use FOS\FacebookBundle\Facebook\FacebookSessionPersistence as BaseFacebookSessionPersistence;
use Symfony\Component\HttpFoundation\Session\Session;
/**
* Quick (and dirty) fix for running tests using FosFacebookBundle.
* It may have unwanted consequences (not tested)!
@meonkeys
meonkeys / assets_version.php
Created November 17, 2012 00:44 — forked from lavoiesl/assets_version.php
Automatic cache busting using Git commit in Symfony2
<?php
// app/config/assets_version.php
$container->loadFromExtension('framework', array(
'templating' => array(
'engines' => array('twig'),
'assets_version' => exec('git rev-parse --short HEAD'),
),
));
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
require 'octokit'
require 'csv'
require 'date'
# Description:
# Exports Github issues from one or more repos into CSV file formatted for import into JIRA
# Note: By default, all Github comments will be assigned to the JIRA admin, appended with
# a note indicating the Github user who added the comment (since you may not have JIRA users
# created for all your Github users, especially if it is a public/open-source project:
#
# Timeout based
lockfile=/var/run/script.lock
(
flock --timeout 60 200 || ( echo "UNKNOWN: Lock failed"; exit 3)
stuff;
) 200>${lockfile}
# Only allow one at a time
lockfile=/var/run/script.lock
#!/usr/bin/python
# .- coding: utf-8 -.
#
# irssi_log_merge.py.
# Written by Lasse Karstensen <lasse.karstensen@gmail.com>, 2008.
# Released under GPLv2.
#
# Newest version available on http://hyse.org/irssi-log-merge/ .
#
# Modified by Florian Rathgeber <florian.rathgeber@gmail.com>
#!/bin/bash
# Install Ruby Centos 6 #
#################
# MUST BE RUN AS ROOT
set -o xtrace
cd /tmp

Tutorial: Meteor in Windows using Vagrant

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on steps 8 to 15.

If you have no idea what I’m talking about, I’ve made a tutorial to install Ubuntu Precise x86 through Windows command-line with Meteor very simple to follow

@meonkeys
meonkeys / web-servers.md
Last active August 29, 2015 14:23 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000