Skip to content

Instantly share code, notes, and snippets.

View voldyman's full-sized avatar

Akshay Shekher voldyman

View GitHub Profile
#include <stdio.h>
#include <stdarg.h>
#define DEBUG
#ifdef DEBUG
#define DEBUG_MSG(fmt, ...) print_debug(fmt, ##__VA_ARGS__)
#else
#define DEBUG_MSG(fmt, args...) ((void) 0)
#endif
[package]
name = "first"
version = "0.1.0"
authors = ["Your Name <you@example.com>"]
[dependencies]
serde = "1.0.81"
serde_json = "1.0.33"
serde_derive = "1.0.81"
@voldyman
voldyman / workspace.sh
Created December 27, 2016 10:47 — forked from dixson3/workspace.sh
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
#!/bin/sh
sudo rm -rf /tmp/abi-test
mkdir -p /tmp/abi-test
cd /tmp/abi-test || exit
sudo apt -y install abi-dumper abi-compliance-checker
GRANITE_A_LP_BRANCH="lp:granite/0.4"
GRANITE_A_VERSION="0.4"
#[derive(Copy, Clone)]
enum Cell {
Empty,
Cross,
Zero
}
fn print_cell(cell: Cell) {
match cell {
Cell::Empty => println!("empty"),
mkdir AppDir
mkdir AppDir/bin
mkdir AppDir/data
cp $INSTALLDIR/app AppDir/bin
cp -r $INSTALLDIR/data AppDir
cp `ldd AppDir/bin/app | grep -o '\W/[^ ]*'` AppDir/bin
cat << "EOF" > AppDir/app
#!/bin/bash
public class ClipboardManager : Object {
private static Gtk.Clipboard monitor_clipboard;
public delegate void MonitorFn();
public static void attach_monitor_selection(MonitorFn fn) {
monitor_clipboard = Gtk.Clipboard.get_for_display (Gdk.Display.get_default (),
Gdk.SELECTION_PRIMARY);
monitor_clipboard.owner_change.connect ((ev) => {
stdout.printf("%s\n", ev.get_event_type ().to_string());
stdout.flush ();
  • 99% invisible
  • Accidental Tech Podcast
  • analog(UE)
  • Bad Voltage
  • BSD Now
  • Coder Radio
  • Freakinomics
  • Developing perspective
  • Hansel minutes
  • Linux unplugged
@voldyman
voldyman / .emacs
Last active August 29, 2015 14:16
Better .emacs file
;; No Splash Screen
(setq inhibit-splash-screen t)
;; Indentation
(setq-default indent-tabs-mode nil)
(setq indent-tab-mode nil)
(setq-default tab-width 4)
(setq c-basic-indent 2)
(global-set-key (kbd "RET") 'newline-and-indent)