Skip to content

Instantly share code, notes, and snippets.

View errordeveloper's full-sized avatar

Ilya Dmitrichenko errordeveloper

View GitHub Profile
#!/usr/bin/env python
#-----------------------------------------------
# Name: fetch_cosm.py
#
# Purpose: retrieve historical hi-res data from cosm
# Usage: ./fetch_cosm.py >>cosm_data.csv
# History:
# Date Author Remarks
# 15Oct2012 RW Created.
#-----------------------------------------------
anonymous
anonymous / gist:4033570
Created November 7, 2012 18:48
#!/usr/bin/env python
#-----------------------------------------------
# Name: fetch_cosm.py
#
# Purpose: retrieve historical hi-res data from cosm
# Usage: ./fetch_cosm.py >>cosm_data.csv
# History:
# Date Author Remarks
# 15Oct2012 RW Created.
#-----------------------------------------------
anonymous
anonymous / fetch_cosm.py
Created October 16, 2012 23:23
Extract hi-res cosm data
#!/usr/bin/env python
#-----------------------------------------------
# Name: fetch_cosm.py
#
# Purpose: retrieve historical hi-res data from cosm
# Usage: ./fetch_cosm.py >>cosm_data.csv
# History:
# Date Author Remarks
# 15Oct2012 RW Created.
#-----------------------------------------------
@jvranish
jvranish / dynamic_alloc_reverse.c
Created September 22, 2012 21:07
Dynamic Allocation without malloc in C (with no mutation!)
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
/*
This is our integer linked list type (Null is an empty list)
(it is immutable, note the consts)
*/
typedef struct IntList_s const * const IntList;
@njh
njh / hddtemp-cosm.sh
Created August 13, 2012 21:41
Send hard disk temperature to cosm.com
#!/bin/sh
COSM_API_KEY="abcdefghijk"
DATASTREAM="/v2/feeds/70987/datastreams/0.csv"
hddtemp -u C -n /dev/sda | \
mosquitto_pub -d -h api.cosm.com -u "$COSM_API_KEY" -t "$DATASTREAM" -s
@josephwecker
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
@yenliangl
yenliangl / fontconfig.properties
Created July 23, 2012 04:24
Java's fontconfig.properties file for Windows 7
# %W% %E%
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Version
version=1
# Component Font Mappings
@srpouyet
srpouyet / nginx.conf
Last active August 5, 2018 22:37
Nginx Upstart script (Ubuntu 12.04)
### Nginx upstart script
### source: http://serverfault.com/a/391737/70451
### /etc/init/nginx.conf
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/sbin/nginx
@krishnenc
krishnenc / gist:2888208
Created June 7, 2012 10:59
byteArrayBody added to Gatling DSL to enable injection of custom byte array bodies
package other
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import com.excilys.ebi.gatling.redis.Predef.redisFeeder
import akka.util.duration._
import bootstrap._
import com.redis._
@17twenty
17twenty / gist:2763814
Created May 21, 2012 18:34
Kernel Module to turn GPIO1_6 on and off
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
#include <plat/gpio.h>
#include <plat/am33xx.h>
#include <asm/io.h>
#define DEVICE_NAME "led_drv"
static __iomem unsigned char *gpio1_start;