Skip to content

Instantly share code, notes, and snippets.

View MarcoPolo's full-sized avatar
🌠
Gradatim

Marco Munizaga MarcoPolo

🌠
Gradatim
View GitHub Profile
package org.myorg;
import java.io.IOException;
import java.util.*;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapred.*;
import org.apache.hadoop.util.*;
asdfasdjfajsjdfj
;****************************************************************************************
; file = ex0.asm
; Quick examples of Assembler directives & 28F335 DSP code
; Dr. Karl Gugel, May/2009
;
; To be assembled using Code Composer Studio which requires a linker command
; file to tell CCR where to place code & data into DSP SRAM.
; The command file used = 28335_RAM_lnk.com
; Important Code locations:
; .text RAML1 (internal DSP memory) starting address = 09000 Hex, 4K Words
@MarcoPolo
MarcoPolo / gist:3998659
Created November 2, 2012 04:06
nginx + express (node)
# the IP(s) on which your node server is running i choose the port 3000
upstream lynkit {
server 127.0.0.1:3000;
}
# the nginx server instance
server {
listen 0.0.0.0:80;
server_name lynkit.org lynkit *.lynkit.org;
access_log /var/log/nginx/lynkit.log;
@MarcoPolo
MarcoPolo / matias.py
Created December 11, 2012 02:42
matias stuff
infile = open('infile.txt', 'r')
content = infile.readlines() #reads line by line and out puts a list of each line
infile.close() #close the input template file
#here is where you change
content[1] = "foo \n" #replaces content of the 2nd line (index 1)
@MarcoPolo
MarcoPolo / stuff
Created January 14, 2013 23:05
stuff
~|⇒ arp -a | grep -i "00:19:b9:04:8e:25"
? (172.16.202.154) at 00:19:b9:04:8e:25 [ether] on eth0
~|⇒ arp -a | grep -i "00:12:3f:b8:9c:16"
? (172.16.202.164) at 00:12:3f:b8:9c:16 [ether] on eth0
~|⇒ arp -a | grep -i "00:12:3f:b8:96:7e"
? (172.16.202.175) at 00:12:3f:b8:96:7e [ether] on eth0
~|⇒ arp -a | grep -i "00:19:b9:04:aa:D9"
? (172.16.202.171) at 00:19:b9:04:aa:d9 [ether] on eth0
~|⇒ arp -a | grep -i "00:19:b9:03:ae:8a"
? (172.16.202.159) at 00:19:b9:03:ae:8a [ether] on eth0
@MarcoPolo
MarcoPolo / caesar.clj
Last active December 14, 2015 00:39
new stuff
;Fixed indentation
(defn range-char [start end]
(let [ i (int start)
j (inc (int end))]
(map char (range i j))))
;Fixed indentation
(defn shift-list [coll n] ;; You don't need to do seq unless you are testing if a seq is empty or changing data structs
(flatten
(reverse (split-at n coll))))
(defn part-by-pattern [predi coll]
(reduce
(fn [result item]
(if (predi (last (last result)) item)
(conj (pop result) (conj (last result) item))
(conj result [item])))
[[(first coll)]]
(vec (rest coll))))
@MarcoPolo
MarcoPolo / gist:5042746
Last active December 14, 2015 06:29
chess
♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜ _______________ ♟ ♟ ♟ ♟ ♟ ♟ ♟ ♟ ______________ ....................................... ______________ ....................................... ______________ ....................................... ______________ ....................................... _______________ ♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙ _______________ ♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖
@MarcoPolo
MarcoPolo / os_test_1.txt
Created February 27, 2013 16:17
cheat sheet
Processes
=========
Why programs exit early
-----------------------
1.Normal exit (voluntary).
2.Error exit (voluntary).
3.Fatal error (involuntary).