This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Based on: http://stackoverflow.com/questions/8571089/how-can-i-find-endian-ness-of-my-pc-programmatically-using-c | |
* | |
* Build: gcc -o whatendianness whatendianness.c | |
* | |
*/ | |
# include <stdio.h> | |
int main (int argc, char **argv) { | |
int num = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# A module for lbdb (http://www.spinnaker.de/lbdb/) for the sup address | |
# book (http://sup.rubyforge.org) | |
# Copyright (C) 2009 Gaute Hope <eg@gaute.vetsj.com> | |
# 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 2 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8- -*- | |
# from: http://piao-tech.blogspot.no/2010/03/get-offlineimap-working-with-non-ascii.html#resources | |
import binascii | |
import codecs | |
# encoding | |
def modified_base64 (s): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# A module for lbdb (http://www.spinnaker.de/lbdb/) for gmail | |
# using goobook. | |
# Copyright (C) 2013 Gaute Hope <eg@gaute.vetsj.com> | |
# 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 2 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
pullify = config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /bin/bash | |
# | |
# Makes a sparsebundle and set it up | |
hostname=$(hostname) | |
# create sparsebundle | |
hdiutil create -size 300g -library SPUD -fs HFS+J -type SPARSEBUNDLE -volname "Backup-${hostname}" "${hostname}.sparsebundle" | |
# enable unsupported volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# do a quick check if there are new messages in a gmail account | |
# | |
# based on: http://cpbl.wordpress.com/2011/11/16/how-to-alpine-maildir-offlineimap/ | |
# | |
# Gaute Hope / 2013-12-13 / eg@gaute.vetsj.com | |
# | |
# requires: curl | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
class Digits { | |
static int get_digits (decimal d) { | |
if (d < 1) { | |
return 0; | |
} else { | |
return 1 + get_digits (d / 10); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to: https://github.com/gauteh/ibcao_py |