Skip to content

Instantly share code, notes, and snippets.

## Wypisanie elementów tablicy do pliku / stdout
## - stałe systemowe -
.equ kernel, 0x80
.equ stdout, 1
.equ exit, 0x01
.equ write, 0x04
.equ create, 0x08 #create file function
.equ close, 0x06 #close file function
## Przykładowo:
## N=5, A B C
## A A B C C
## A B B B C
## B B B B B
## A B B B C
## A A B C C
## - stałe systemowe -
## - stałe systemowe -
.equ kernel, 0x80
.equ stdout, 1
.equ exit, 0x01
.equ write, 0x04
.data
text:
.ascii "lorem ipsum .dolor sit, amet!\n(lol)\nlol2\n"
text_len:
.long ( . - text)
Niech ryczy z bólu ranny łoś,
Zwierz zdrów przebiega knieje.
Ktoś nie śpi, aby spać mógł ktoś,
To są zwyczajne dzieje.
@biern
biern / quiz.py
Created June 10, 2011 12:07
Simple script parsing questions from a plain text file and making a quiz from them.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import random
import sys
import subprocess
from optparse import OptionParser
@biern
biern / .bashrc
Created August 5, 2011 23:00
alwaysdata config
export PYTHONPATH=~/modules/
export PATH=~/modules/bin:~/modules/:$PATH
export WORKON_HOME=$HOME/.virtualenvs
source ~/modules/virtualenvwrapper.sh
export PIP_REQUIRE_VIRTUALENV=true
export PIP_RESPECT_VIRTUALENV=true
export PIP_VIRTUALENV_BASE=$WORKON_HOME
# source .bash_profile
#!/bin/bash
hash make 2>&- || { echo >&2 "I require make but it's not installed. Aborting."; exit 1; }
hash autoreconf 2>&- || { echo >&2 "I require aureconf but it's not installed. Aborting."; exit 1; }
hash unzip 2>&- || { echo >&2 "I require unzip but it's not installed. Aborting."; exit 1; }
hash svn 2>&- || { echo >&2 "I require svn but it's not installed. Aborting."; exit 1; }
function errorcheck(){
if [ "$?" -gt 0 ]; then
body {
font-size: 50pt;
}
.rot-headline {
font-size: 200pt;
position: absolute;
text-align: center;
}
@biern
biern / RouteTest.js
Created May 28, 2017 17:30
Render Route with enzyme shallow() proof of concept
import React from 'react';
import { Route } from 'react-router-dom';
export default class RouteTest extends React.PureComponent {
render() {
return (
<div>
<Route path="/hello" render={() => (<div>Hello world!</div>)} />
</div>
defmodule Life.Game do
@type cell :: {integer, integer}
@type state :: [cell]
@adjacency_offsets [
{-1, -1}, {-1, 0}, {-1, 1}, {0, -1},
{0, 1}, {1, -1}, {1, 0}, {1, 1},
]
@spec next(state) :: state