Skip to content

Instantly share code, notes, and snippets.

/*
* Compile with -lxcb -lxcb-randr
*/
#include <stdio.h>
#include <stdlib.h>
#include <xcb/xcb.h>
#include <xcb/randr.h>
int main() {
@heralight
heralight / gen-dummy-package.sh
Created November 3, 2015 17:59
A script to generate dummy debian package with equivs to bypass crazy dependencies
#!/bin/bash
installPackage=false
function process
{
packageName=$1
echo "######### key : $packageName"
v=$(eval "apt-cache policy $packageName | grep 'Candidate:' | cut -c 14-")
echo "######### version: $v"
@favadi
favadi / build-emacs.sh
Last active September 16, 2025 22:30
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
@tom-spalding
tom-spalding / .gitignore
Last active April 27, 2017 07:01
Script to import your Google calendar into Orage.
url.txt
*.pyc
#!/usr/bin/python
# Title: Reddit Data Mining Script
# Authors: Clay McLeod
# Description: This script mines JSON data
# from the Reddit front page and stores it
# as a CSV file for analysis.
# Section: Python
# Subsection: Data Science
want=["domain", "subreddit", "subreddit_id" "id", "author", "score", "over_18", "downs", "created_utc", "ups", "num_comments"]
@adrianratnapala
adrianratnapala / automon.sh
Created October 28, 2011 20:56
Automatic multi-monitor config via xrandr.
#!/bin/sh
# automon.sh -- automatically configures multiple monitors.
#
# I use this script on Arch Linux. This handles my personal monitor setup more
# correctly and robustly than either Ubuntu or Windows 7, however it is only
# designed to work on my laptop.
#
# On that laptop it always calls "xrandr" using the exactly the same arguments.
# The --auto option in xrandr is clever enough to do the rest. One day this
# script might become more flexible.