Skip to content

Instantly share code, notes, and snippets.

View RicoP's full-sized avatar
🎯
Focusing

Rico P RicoP

🎯
Focusing
View GitHub Profile
@RicoP
RicoP / loop.c
Created April 20, 2012 15:38
Quickloop
#include <stdio.h>
#define repeat(VAR,TO,ACTION) \
{ \
int VAR = 0; \
switch((TO) % 8) { \
while(VAR != (TO)) { \
ACTION; VAR++; \
case 7: \
ACTION; VAR++; \
@RicoP
RicoP / smc.sh
Created January 18, 2012 13:10
SMC bash
#/bin/bash
java -jar ~/apps/smc_6_1_0/bin/Smc.jar $@
FILE=$_
if [[ "$@" == *-js* ]]
then
NAME="${FILE%%.*}"
SM="${NAME}_sm.js"
sed 's/\/\/# No actions.//g' $SM > $SM~
java -jar ~/apps/closure-compiler/compiler.jar --js $SM~ --js_output_file $SM --formatting PRETTY_PRINT --compilation_level WHITESPACE_ONLY
rm $SM~