Skip to content

Instantly share code, notes, and snippets.

View zidarsk8's full-sized avatar
🐢

Miha Zidar zidarsk8

🐢
View GitHub Profile
@zidarsk8
zidarsk8 / jame.java
Created October 19, 2013 15:56
upm naloga
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.TreeSet;
public class Jame{
private static TreeSet visited = new TreeSet();
#!/bin/bash
set -o nounset
set -o errexit
SPU_HOME="/home/spu"
if [ ! -d "$SPU_HOME" ]; then
echo "key folder not found: $SPU_HOME"
exit 1
- name: ensure github.com is a known host
lineinfile:
dest: /home/vagrant/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"
a = {
t : "text",
o : (function(){
return {
f: function(){
console.log(this.t);
}
};
})()
}
var a = {
b: "text",
h: function(c){
function compare(a,b){
return a.indexOf(b)
}
// how to make this work nicely?
return c.reduce(function(result, key) {
function def(a){
console.log(1, a, typeof a !== 'undefined' ? a : true );
console.log(2, a, a || true );
console.log(3, a, !!a );
}
def()
def(true)
menuentry 'ArchLinux reciprocity' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-91816283-78a8-4958-989c-3056ea1c90dc' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2 91816283-78a8-4958-989c-3056ea1c90dc
function install_yaourt {
local aa=$(pwd)
pacman -Syy --noconfirm yajl wget binutils base-devel
cd /tmp
wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
tar -xpvf package-query.tar.gz
cd package-query
"""fill object types table with workflow models
Revision ID: 4f9f00e4faca
Revises: 57cc398ad417
Create Date: 2015-04-03 10:12:50.583661
"""
from alembic import op
import sqlalchemy as sa
@zidarsk8
zidarsk8 / union.py
Created January 6, 2016 00:13
Example of slow union generation.
#!/usr/bin/env python
import random
import string
import timeit
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import create_engine