Skip to content

Instantly share code, notes, and snippets.

@pklaus
pklaus / StatusIcon.py
Created February 15, 2010 20:36
StatusIcon – A Simple Tray Icon Application Using PyGTK
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."
@austinmarton
austinmarton / sendRawEth.c
Created February 27, 2012 08:40
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@liamzebedee
liamzebedee / gist:5055929
Last active January 29, 2019 14:49
thunderbird-composetab-3
diff -r a49f5ca048d9 calendar/base/content/dialogs/calendar-event-dialog.js
--- a/calendar/base/content/dialogs/calendar-event-dialog.js Sat Jan 12 11:37:57 2013 -0500
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js Thu Feb 28 20:57:59 2013 +1000
@@ -6,6 +6,7 @@
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://calendar/modules/calRecurrenceUtils.jsm");
Components.utils.import("resource:///modules/mailServices.js");
+Components.utils.import("chrome://messenger/content/msgComposeTab.js");
try {
@wandernauta
wandernauta / sp
Last active April 16, 2024 15:37
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@winny-
winny- / force-inet4-or-inet6.c
Last active November 30, 2023 00:27
Force IPv4 or IPv6 in applications such as Lynx
/*
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c
usage: LD_PRELOAD=/path/to/library.so program args ...
This file is in the public domain.
*/
@venkateshshukla
venkateshshukla / AndroidDevLinux
Last active September 19, 2023 04:20
Setting up your Linux for Android Application Development
Step 1. Preparation
--------------------
First take care of the dependencies for Android Application Development.
Dependencies are -
1. Java
2. ant
3. Eclipse and Android Development tools (IDE)
4. Android SDK and NDK
5. adb
@flankerhqd
flankerhqd / external.patch
Created June 5, 2014 13:17
Patch on mksh to enable shell command logging into logcat. Rememeber to replace ash to mksh on emulator builds.
diff --git a/Android.mk b/Android.mk
index e53b863..1d3854e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -8,7 +8,6 @@ LOCAL_PATH:= $(call my-dir)
# /system/etc/mkshrc
include $(CLEAR_VARS)
-
LOCAL_MODULE:= mkshrc
@flowolf
flowolf / prosody.cfg.lua
Created January 6, 2015 17:39
Prosody Config
-- Prosody XMPP Server Configuration
--
-- Information on configuring Prosody can be found on our
-- website at http://prosody.im/doc/configure
--
-- Tip: You can check that the syntax of this file is correct
-- when you have finished by running: luac -p prosody.cfg.lua
-- If there are any errors, it will let you know what and where
-- they are, otherwise it will keep quiet.
--
@josejuansanchez
josejuansanchez / bazaar-to-git.md
Last active April 6, 2021 13:41
How to import the p2psp bazaar repository in GitHub

1. Install bzr and bzr-fastimport

sudo apt-get install bzr
sudo apt-get install bzr-fastimport

2. Get the trunk branch from launchpad

bzr branch lp:p2psp 
@rachelhyman
rachelhyman / gist:b1f109155c9dafffe618
Last active February 21, 2024 18:20
Github README anchor links

To create anchor links that jump down to different sections of a README (as in an interactive table of contents), first create a heading:
#Real Cool Heading

The anchor link for that heading is the lowercase heading name with dashes where there are spaces. You can always get the anchor name by visiting the README on Github.com and clicking on the anchor that appears when you hover to the left of the heading. Copy everything starting at the #:
#real-cool-heading

Wherever you want to link to your Real Cool Heading section, put your desired text in brackets, followed by the anchor link in parentheses:
[Go to Real Cool Heading section](#real-cool-heading)