Skip to content

Instantly share code, notes, and snippets.

View attilaolah's full-sized avatar
🌳
Hacking on jasen.org.rs

Attila Oláh attilaolah

🌳
Hacking on jasen.org.rs
View GitHub Profile
@attilaolah
attilaolah / jq.BUILD
Last active November 25, 2018 09:14 — forked from benley/jq.BUILD
bazel build jq
licenses(["notice"])
cc_binary(
name = "jq",
visibility = ["//visibility:public"],
srcs = glob([
"*.h",
"*.c",
]),
copts = [
@attilaolah
attilaolah / LICENSE
Last active April 2, 2023 02:42
Google Apps Script for converting UTM coordinates to [latitude, longitude].
Copyright 2018 Google LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
POLYGON((397286.916999997 4795599.52079938,397311.239399999 4795618.50309938,397310.943099998 4795630.07069938,397320.138199999 4795639.56189938,397341.493999998 4795640.45119938,397359.587199995 4795646.08619938,397372.638100001 4795651.42479938,397389.248199998 4795654.39039938,397404.968599999 4795660.02549938,397443.943599998 4795687.60889938,397450.765699999 4795688.79519938,397482.7994 4795688.49759939,397497.630599999 4795717.26819938,397511.868699999 4795751.55569938,397535.301099996 4795767.27529938,397556.3605 4795773.50339938,397569.411400001 4795778.24869938,397583.055700003 4795787.44319938,397599.666199999 4795805.83239938,397613.607199998 4795819.77259938,397630.810399997 4795817.39929938,397665.632100003 4795818.16949939,397679.869599999 4795828.84699938,397695.886399995 4795827.66009938,397711.606899999 4795838.33749938,397760.547799995 4795856.72579938,397791.394699999 4795846.34359939,397801.182600001 4795841.89429938,397851.724599999 4795842.48609938,397880.495999997 4795856.72239938,39789
@attilaolah
attilaolah / DHT11_BMP180_server.ino
Last active September 24, 2017 14:20
HTTP JSON API: ENC28J60 + DHT11 + BMP180 + UNO
// HTTP JSON API.
#include <EtherCard.h>
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_BMP085_U.h>
// Ethernet:
@attilaolah
attilaolah / sharenet.sh
Created March 3, 2015 22:21
Internet Sharing
#!/usr/bin/env sh
#
# Internet Sharing
#
# Based on: https://wiki.archlinux.org/index.php/Internet_sharing
#
LAN=enp0s0
WAN=wlp0s0
@attilaolah
attilaolah / index.sh
Created March 3, 2015 19:29
Radio Index
#!/usr/bin/env sh
rtmpdump -v -r "rtmp://37.187.153.186:1935/asmedia/index" -o- \
| cvlc \
--extraintf http \
--http-password changeme \
-
@attilaolah
attilaolah / pixel.go
Created December 15, 2014 15:44
Serve a 1-pixel PNG in Go
// Package pixel serves a one pixel image.
package pixel
import (
"encoding/base64"
"net/http"
)
const px = `iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII=`
@attilaolah
attilaolah / p38n31.go
Created March 12, 2014 07:53
Naive take on this math problem: http://math.stackexchange.com/q/597234
package main
import (
"math/big"
"fmt"
)
type powersOf struct {
E int64
b, n *big.Int
@attilaolah
attilaolah / git-aliases.sh
Last active December 27, 2015 01:29 — forked from matthieua/git-aliases
git aliases for command line ninjas
alias g='git status'
alias gb='git branch'
alias gd='git diff'
alias gdm='git diff master'
alias gl='git log'
alias ga='git add'
alias gaa='git add -p .'
alias gco='git checkout'
alias gc='git commit -v'
alias gca='git commit -v -a'
@attilaolah
attilaolah / update.sh
Created August 9, 2013 16:22
Google Now wallpaper changer
#! /usr/bin/env sh
# Execute this file:
# - when logging in
# - from a cron job whet the day of time changes (see below)
# An improved version could probably get the location from
# the internet, and use that to figure out sunrise/sunset times.
# Select a random directory.