This file contains hidden or 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
| #!/usr/bin/sbcl --script | |
| ;; | |
| ;; You don't really need to supply a class literal to use methods, | |
| ;; this way you can exploid the :before, :after, :around auxiliary | |
| ;; methods! | |
| ;; | |
| (defmethod myfunc (lst) | |
| (format t "~A~%" lst)) |
This file contains hidden or 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
| Erlang R16B02 (erts-5.10.3) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false] | |
| Eshell V5.10.3 (abort with ^G) | |
| 1> io:format("Get out of here stalker~n"). | |
| Get out of here stalker | |
| ok | |
| .> io:format("Get out of here stalker~p~n",[[1,2,3,4,5]]). | |
| Get out of here stalker[1,2,3,4,5] | |
| ok | |
| 3> q(). |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # @author Simon (psyomn) Symeonidis | |
| # Because doing something this simple in a Makefile requires you to read a huge | |
| # fucking manual. | |
| def make(note, output_name) | |
| puts "#{note} >>> #{output_name}" | |
| `pandoc #{note} -o #{output_name}` | |
| end |
This file contains hidden or 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
| class Person | |
| end | |
| person = Person.new | |
| Person.instance_eval "attr_accessor :name" | |
| person.name = "bobby" | |
| puts person.name | |
| person.instance_eval "def greet; puts 'hello ' end" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| if [ -z $1 ] || [ -z $2 ] | |
| then | |
| echo "usage: ghclone username reponame"; | |
| exit; | |
| fi | |
| git clone https://github.com/$1/$2.git |
This file contains hidden or 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
| .file "t.c" | |
| .section .rodata | |
| .LC0: | |
| .string "%d\n" | |
| .text | |
| .globl main | |
| .type main, @function | |
| main: | |
| .LFB0: | |
| .cfi_startproc |
This file contains hidden or 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
| <html> | |
| <head> | |
| <style type="text/css"> | |
| .main{ | |
| margin-top:50px; | |
| margin-bottom:100px; | |
| margin-left:auto; |
This file contains hidden or 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
| object Human { | |
| attributes { | |
| expirationDate : date; | |
| } | |
| operations { | |
| breathe() : void; | |
| } | |
| } | |
| /* You can comment in C/C++ ways too */ |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # Uri :: http://www.reddit.com/r/dailyprogrammer/comments/1g0tw1/ | |
| # Author :: Simon Symeonidis | |
| charbuff = [] | |
| current_string, result = String.new, String.new | |
| $stdin.gets.chomp!.chars do |c| | |
| charbuff.push c unless charbuff.member? c | |
| if charbuff.size > 2 | |
| charbuff = charbuff.drop(1) |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| arr = [ | |
| [:a, [1,2,2,2,2,1]], | |
| [:b, [3,3,3,3,3,4,4,4]], | |
| [:c, [8,8,8,8,8,8,8]]] | |
| headers = arr.collect{|el| el[0]} | |
| headers.each do |h| |