Skip to content

Instantly share code, notes, and snippets.

View javahippie's full-sized avatar

Tim Zöller javahippie

View GitHub Profile
@javahippie
javahippie / awesome-tech-feeds.md
Last active November 4, 2022 12:52
Awesome Tech RSS Feeds
@javahippie
javahippie / epp.clj
Created October 17, 2021 19:59
Exports my 20 "most symmetric" pictures from Apple Photos as files. "Most symmetric", according to Apples internal machine learning results.
#!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/go-sqlite3 "0.0.1")
(require '[pod.babashka.go-sqlite3 :as sqlite])
(require '[clojure.java.shell :refer [sh]])
(def sqlite-path "/users/zoeller/Pictures/Photos Library.photoslibrary/database/Photos.sqlite")
(def find-by-ml ["select asset.Z_PK, asset.ZUUID
@javahippie
javahippie / Oracle_error.sql
Created November 18, 2020 08:37
Simple repro case to create a segfault in Oracle 19c
CREATE TABLE JSON_TEST(
ID NUMBER(19, 0) NOT NULL,
JSON_COLUMN VARCHAR2(4000 CHAR) NOT NULL
);
ALTER TABLE JSON_TEST ADD CONSTRAINT CHECK_JSON CHECK (JSON_COLUMN IS JSON);
INSERT INTO JSON_TEST (ID, JSON_COLUMN) VALUES (1, '{"languages": [{"id": "1", "name": "java"},
{"id": "2", "name": "clojure"},
{"id": "3", "name": "sql"}]}');

Keybase proof

I hereby claim:

  • I am javahippie on github.
  • I am javahippie (https://keybase.io/javahippie) on keybase.
  • I have a public key ASCQ4EnC4O8ClA8CH-fk7U5haTcQXoWztHm9M9uIjk2ONQo

To claim this, I am signing this object:

@javahippie
javahippie / spoof.sh
Created July 30, 2018 15:31
Short script to change the MAC Address on OSX
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "You need to run the file as root"
exit
fi
WIFI_INTERFACE=en0
NEW_MAC_ADDRESS=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
ifconfig $WIFI_INTERFACE ether $NEW_MAC_ADDRESS
@javahippie
javahippie / instantiate_contract.js
Created March 19, 2018 18:30
Instantiate Ethereum Contract and call function
var contract = web3.eth.contract(Contract.abi).at(Contract.address);
var vin = 'W0L000051T2123456';
contract.createCar(vin, function (error, result) {
if(!error) {
UI.showTransactionSuccess(); // Do something on the UI if the call is successful
}
});
@javahippie
javahippie / send_eth_transaction.js
Last active March 19, 2018 18:27
Send a transaction on the Ethereum network
var request = {from: '0x.....', //the senders address
to: '0x.....', //the receiving address
value: 100}; //the value to be sent
web3.eth.sendTransaction(request, function(error, response) {
callback(error, tx);
});
@javahippie
javahippie / connect_web3.js
Last active March 19, 2018 18:28
Create a new Web3 Instance via RPC
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
@javahippie
javahippie / odometer.sol
Last active May 8, 2019 09:04
Smart contract for a car registration and odometer
pragma solidity ^0.4.21;
/**
* Contract to store the mileage of a car
*/
contract Odometer {
event Creation(
address indexed from,
string indexed vin
@javahippie
javahippie / app.json
Created March 2, 2018 17:14
Configuration file for the Eth Status Monitor
[
{
"name" : "geth-dev-0",
"cwd" : ".",
"script" : "app.js",
"log_date_format" : "YYYY-MM-DD HH:mm Z",
"merge_logs" : false,
"watch" : false,
"exec_interpreter" : "node",
"exec_mode" : "fork_mode",