Skip to content

Instantly share code, notes, and snippets.

View psyomn's full-sized avatar
♥️
HARD WORK AND DISCIPLINE

psyomn

♥️
HARD WORK AND DISCIPLINE
  • Montreal
View GitHub Profile
@psyomn
psyomn / template-example.erb
Last active August 29, 2015 14:07
[wlog v1.2.0] Template example for wlog
<%
begin
require 'rinku'
rescue
class Rinku
def self.auto_link(str)
str + "[Rinku not working]"
end
end
end
@psyomn
psyomn / gitparse.rb
Created October 6, 2014 08:10
Parse git logs to simple objects
#!/usr/bin/env ruby
# Small crappy script to parse git logs
# Simon Symeonidis
str = 'git --git-dir ~/programming/ruby/wlog/.git log'
result = `#{str}`
class GitLog
@psyomn
psyomn / template-example.erb
Created October 4, 2014 22:44
Template example for wlog
<html>
<head>
<style type="text/css">
#issue {
border:1px #000000 solid;
margin:10px;
padding:10px;
border-radius:0 10px 0 10px;
}
@psyomn
psyomn / sendudp.c
Created August 23, 2014 21:08
sendudp C file, modified from Paul Kryzanowski
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <netdb.h>
/* somewhat modified version of Paul Kryzanowski's example
* https://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html
*/
@psyomn
psyomn / easy.asm
Created April 18, 2014 01:45
Simple asm
; Me dicking around with 64bit nasm. Depending on the number of arguments given
; we print a number of dots. Does not do much, but should help the asm
; beginner just as it did me.
;
; author: Simon Symeonidis
section .data
message: db ". ", 0
nl: db 0xA
counter: dd 0
@psyomn
psyomn / mk.screen.sh
Created April 11, 2014 22:56
mk.screen for quick screen making
#!/usr/bin/env bash
# Standard screen stuff that I do too many times
# add this at something like $HOME/.custom/bin/
# and add that path to your PATH env to run this
#
# Example usage:
# mk.screen myproject
screen -dmS $1
screen -S $1 -X screen -t src
# Doxyfile 1.8.6
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
-- Solution for /r/dailyprogrammer
-- http://www.reddit.com/r/dailyprogrammer/comments/217klv/
--
-- Compile and run with:
-- gnatmake brackets.adb && ./brackets
-- @author Simon Symeonidis
with ada.text_io; use ada.text_io;
with ada.exceptions; use ada.exceptions;
with ada.strings.unbounded; use ada.strings.unbounded;
@psyomn
psyomn / strtest.hs
Created March 5, 2014 18:35
Functor / IO Gripes
import Data.Char
str2Upper :: String -> String
str2Upper name = map toUpper name
main = do
-- LHS line becomes string; RHS is IO String
line <- fmap reverse getLine
-- Since line is now String, we can assign using let to line2,