Skip to content

Instantly share code, notes, and snippets.

View mandulaj's full-sized avatar
🤖
👍

Jakub Mandula mandulaj

🤖
👍
View GitHub Profile
@mandulaj
mandulaj / ToG25.go
Last active August 29, 2015 14:04
Tour of Go
package main
import (
"fmt"
)
func Sqrt(x float64) float64 {
z:= x
for i:=0;i<10000;i++ {
z=z-(z*z-x)/(2*z)
@mandulaj
mandulaj / .vimrc
Created September 6, 2014 16:44
My .vimrc
syntax on
set shiftwidth=4
set tabstop=4
set smarttab
set expandtab
set autoindent
set nocompatible
set number
package com.company;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
public class GameOfLife extends JFrame
{
@mandulaj
mandulaj / fake.js
Created January 25, 2015 15:05 — forked from kentcdodds/fake.js
var colors = [
'rgb(30, 104, 35)', 'rgb(68, 163, 64)', 'rgb(140, 198, 101)', 'rgb(214, 230, 133)', 'rgb(238, 238, 238)'
];
var days = $('.js-calendar-graph-svg').find('rect.day');
days.css({
fill: colors[4]
});
days.on('click', function(e) {
e.stopPropagation();
$this = $(this);
@mandulaj
mandulaj / gitdeploy.sh
Created April 1, 2015 16:19
Git deployment to gh-pages
BUILD_DIR=build
git add -f $BUILD_DIR
git commit -m "git deployment"
git push origin `git subtree split --prefix $BUILD_DIR master`:gh-pages --force
git reset HEAD^
git reset $BUILD_DIR
@mandulaj
mandulaj / .bashrc
Created April 7, 2015 11:52
My bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@mandulaj
mandulaj / picounter.c
Last active October 27, 2015 12:10
Pi counter for ATtiny84
/* picounter.c
Counts digits of pi in binary.
*/
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
@mandulaj
mandulaj / startWlan.bat
Last active October 27, 2015 12:25
Windows Wifi hotspot creation
netsh wlan stop hostednetwork
netsh wlan set hostednetwork mode=allow ssid=NANANA key=password123
netsh wlan start hostednetwork
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"math/rand"
"os"
)

Keybase proof

I hereby claim:

  • I am mandulaj on github.
  • I am mandula (https://keybase.io/mandula) on keybase.
  • I have a public key ASC-ftOgJdN8l8Au6R0F7carsWKuJfAKLvkQPRd5dtXILgo

To claim this, I am signing this object: