Skip to content

Instantly share code, notes, and snippets.

View orangejulius's full-sized avatar
🌍
making Geocode Earth and open data better :)

Julian Simioni orangejulius

🌍
making Geocode Earth and open data better :)
View GitHub Profile
env="dev"
kubectl -n website-$env create sa helm-deploy
secret=$(kubectl -n website-$env get sa helm-deploy -o json | jq -r .secrets[].name)
kubectl -n website-$env get secret $secret -o json | jq -r '.data["ca.crt"]' | base64 -d > $env.crt
user_token=$(kubectl -n website-$env get secret $secret -o json | jq -r '.data["token"]' | base64 -d)
{"continent":[{"id":102191581,"name":"Europe","centroid":{"lat":55.924452,"lon":28.09812},"bounding_box":"-24.539906,34.815009,69.033946,81.85871"}],"country":[{"id":85632785,"name":"Austria","abbr":"AUT","centroid":{"lat":47.586911,"lon":14.141446},"bounding_box":"9.5299595,46.372299,17.1607035,49.020336"}],"county":[{"id":102049723,"name":"Innsbruck - Stadt","centroid":{"lat":47.288818,"lon":11.380546},"bounding_box":"11.301649,47.2107755,11.4559775,47.3597715"}],"localadmin":[{"id":1108837687,"name":"Innsbruck","centroid":{"lat":47.288891,"lon":11.380552},"bounding_box":"11.3016486328,47.210775772,11.4559603473,47.3601202806"}],"locality":[{"id":101748061,"name":"Innsbruck","centroid":{"lat":47.26907,"lon":11.396603},"bounding_box":"11.3218091258,47.2470573997,11.452584553,47.29398"}],"region":[{"id":85681661,"name":"Tirol","centroid":{"lat":47.194679,"lon":11.501915},"bounding_box":"10.097882,46.6515355,12.9659975,47.742958"}]}
var elasticsearch = require('elasticsearch');
/*
* Elasticsearch document updater script
*
* Given a query that returns the ids of records meeting some sort of criteria,
* run a bunch of individual update queries to fix the records.
*
* Obviously for this to work, the search query has to return fewer and fewer
* documents as those changes are made.

CPF Open

  • NationJS, Washington DC, USA, March 11, CPF Closes Jan 28
  • Scotland JS, Edinburg, Scotland, June 2-3, CPF Closes Jan 30
  • Ruby on Ales, Bend, OR, March 31/April 1, CPF Closes Jan 31st
  • Midwest JS, Minneapolis, Minnesota, Aug 10-12, CPF Closes March 5th

CPF Closed

  • wroc_love.rb, Wroclaw, Poland, March 11-13, CPF Closed Jan 11
  • Ancient City Ruby, St. Augustine, FL, April 6-8, CPF Closed Jan 11
  • Railsconf, Kansas City, MO, May 4-6, CPF Closes Jan 15
require 'git'
require 'logger'
revert_branch_name = "origin/remove-failing-tests"
working_dir = '.'
g = Git.open(working_dir, :log => Logger.new(STDOUT))
base_commit = g.gcommit('5b78d2b')
branch_tip_commit = g.gcommit(revert_branch_name)
@orangejulius
orangejulius / Keybase.md
Created March 13, 2015 18:36
Keybase.md

Keybase proof

I hereby claim:

  • I am orangejulius on github.
  • I am juliansimioni (https://keybase.io/juliansimioni) on keybase.
  • I have a public key whose fingerprint is C970 12C1 ECEB 6E88 38E3 67BF B9EE B0C6 EE09 10A1

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /usr/share/maven-bin-3.0
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /opt/oracle-jdk-bin-1.8.0.25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.18.0-rc3+", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/share/maven-bin-3.0/conf/settings.xml
[DEBUG] Reading user settings from /home/spectre256/.m2/settings.xml
[DEBUG] Using local repository at /home/spectre256/.m2/repository
@orangejulius
orangejulius / timelapse
Created September 24, 2013 07:32
Create a timelapse from a directory full of images. Pass the directory name as the first parameter and a .mkv file with the name of that directory will be created. Requires ffmpeg
#!/bin/bash
pictureDir=$1
# make symlinks
pushd $pictureDir
j=0
for i in `ls *.JPG`; do
ln -s $i $j.jpg
#!/bin/bash
createTunnel() {
/usr/bin/ssh -f -N -R 10022:localhost:22 -L19922:juliansimioni.com:27823 juliansimioni.com
if [[ $? -eq 0 ]]; then
echo Tunnel to hostb created successfully
else
echo An error occurred creating a tunnel to hostb RC was $?
fi
}
user_ids = ''
results.each do |result|
user_ids += results[:twitter_id] + ', '
end