Skip to content

Instantly share code, notes, and snippets.

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

psyomn

♥️
HARD WORK AND DISCIPLINE
View GitHub Profile
@psyomn
psyomn / konky.adb
Created April 27, 2013 23:48
Some Ada scraps from here and there.
-- @author Simon Symeonidis
-- A messy way to stop tasks. Define a global variable and have the loop bodies
-- for the tasks check that boolean variable if it is true or not, and continue
-- the looping or not, respectively.
with Ada.Text_IO;
procedure konky is
STOP_ANNOYING_PERSON : Boolean := False;
@psyomn
psyomn / retarded.rb
Created May 1, 2013 15:48
The most useful ruby script in the world.
p \
p p \
p p p \
p p p p \
p p p p p \
p p p p p p \
p p p p p p p \
p p p p p p p p \
p p p p p p p p p \
@psyomn
psyomn / fpointers.c
Created May 24, 2013 13:17
How to give children nightmares at night.
/*
* How to give children nightmares at night.
*/
#include <stdio.h>
int func_a(int a, int b){ return a + b; }
int func_b(int a, int b){ return a - b; }
int func_c(int a, int b){ return a * b; }
int func_d(int a, int b){ return a / b; }
@psyomn
psyomn / paranoia.user.js
Created May 24, 2013 14:32
Adds random eerie strings when browsing with Chrome. It was crudely made to scare a friend of mine.
// ==UserScript==
// @name Induced Paranoia
// @description They're out to get you.
// @version 1.0
// ==/UserScript==
(function ()
{
var phrases = [
@psyomn
psyomn / group_arr.rb
Last active December 17, 2015 17:18
Things I tend to forget in ruby.
#!/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|
@psyomn
psyomn / 2csub.rb
Last active December 18, 2015 09:38
Collections of solutions on /r/dailyprogrammer. Yeah I somewhat found a reason to use reddit.
#!/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)
@psyomn
psyomn / example.rctl
Last active December 18, 2015 18:58
rctl for vim
object Human {
attributes {
expirationDate : date;
}
operations {
breathe() : void;
}
}
/* You can comment in C/C++ ways too */
@psyomn
psyomn / greek.html
Created September 13, 2013 18:22
Silly implementation for a javascriptish Greek keyboard
<html>
<head>
<style type="text/css">
.main{
margin-top:50px;
margin-bottom:100px;
margin-left:auto;
@psyomn
psyomn / t.asm
Created October 9, 2013 19:28
Weird stuff again
.file "t.c"
.section .rodata
.LC0:
.string "%d\n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
@psyomn
psyomn / ghclone.sh
Created October 22, 2013 15:22
Quickhand to download things from github if you remember the username of the guy and her repo.
#!/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