Skip to content

Instantly share code, notes, and snippets.

@ericfode
ericfode / gist:3286021
Created August 7, 2012 14:54 — forked from akaptur/gist:3279183
quicksort in C
#include <stdio.h>
#include <stdlib.h>
void quicksort(int *array, int length);
void swap(int *a, int *b);
void print(int *array, int length);
int main()
{
import System.Random
import Wumpus.Core
import Wumpus.Core.Colour
import Wumpus.Drawing.Shapes
import Wumpus.Basic.Kernel
import System.Directory
makeRandomPoint :: (RandomGen g, Random f) => (f , f) -> g -> ((f,f),g)
makeRandomPoint limit gen =
@ericfode
ericfode / sentences.c
Created May 7, 2012 00:46 — forked from anonymous/sentences.c
c program
#include <stdio.h>
#include <string.h>
//Declaring variables..
int numOfSentences;
int numOfWords;
char word[1]; //temp variable to read in stuff from the file and check it.
char articles[10];
#include "stdlib.h"
#include "stdio.h"
#include "malloc.h"
typedef struct genePart* GenePart;
typedef struct geneData* GeneData;
typedef struct geneNode* GeneNode;
typedef u_char byte;
typedef struct bruteTreeTrainer* BruteTreeTrainer;
typedef struct geneDataSlice* GeneDataSlice;
typedef struct trainingData* TrainingData;
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'Solarized'
Plugin 'SuperTab'
{"meta":{"code":200},"data":[{"id":235681245,"credit_id":351968,"address_id":71838242,"delivery_date":null,"user_id":9283,"charge_id":"ch_6hP6yk4XenlVrE","created_at":"2015-07-29T19:32:55.237Z","updated_at":"2015-07-29T21:01:26.217Z","total":"46.34","shipping_price":"0.0","receipt_sent_at":"2015-07-29T20:54:13.494Z","refund_amount":"0.0","refund_processed_at":null,"special_instructions":"ring doorbell number 1 with no name","subtotal":"40.3","coupon_discount":{"fractional":"0.0","currency":{"id":"usd","alternate_symbols":["US$"],"decimal_mark":".","disambiguate_symbol":null,"html_entity":"$","iso_code":"USD","iso_numeric":"840","name":"United States Dollar","priority":1,"smallest_denomination":1,"subunit":"Cent","subunit_to_unit":100,"symbol":"$","symbol_first":true,"thousands_separator":","},"bank":{"rounding_method":null,"rates":{},"mutex":{}}},"charge_amount":"46.34","canceled_at":null,"canceled_sent_at":null,"route_order":null,"refund_reason":null,"refund_special_message":null,"duplicate_of_id":null,"admi
@ericfode
ericfode / .spacemacs
Last active August 29, 2015 14:21
My spacemacs dot file
;; -*- mode: dotspacemacs -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (ie. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
@ericfode
ericfode / chef-standards
Last active August 29, 2015 14:08
Hello!
Prior art
===========
Cookbook style guides
---------------------
* https://github.com/ampledata/cookbook-style-guide
* https://github.com/infochimps-labs/ironfan/wiki/style_guide
* https://github.com/secondmarket/chef-style-guide
* http://acrmp.github.io/foodcritic/
require 'serverspec'
include Serverspec::Helper::Exec
include Serverspec::Helper::DetectOS
describe 'resolve assigned host name to an ipaddress' do
describe host('test-node') do
it { should be_resolvable.by('hosts') }
end
end
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
#Hygene
guard "foodcritic", :cookbook_paths => ".", :all_on_start => false do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch(%r{^templates/(.+)})