Skip to content

Instantly share code, notes, and snippets.

@mshock
mshock / julian2ymd.pl
Created April 21, 2013 00:36
Perl sub converts a Julian date number (JDN) into its Gregorian year, month, day, components not 100% precise for JDN too far in the past, but seems good for modern dates (algorithm & constants from Wikipedia)
# convert julian date number into Gregorian year, month, day parts
# not precise too far in the past... 1580-something?
sub jdn2greg {
my ($jdate) = @_;
# make sure formatted like JDN (DDDDDDD[.D*])
return if $jdate !~ m/^\d{7}\.?(\d*)$/;
# TODO add support for time here based on fractional day RH side of decimal place
# define conversion constants
my $y = 4716;
@Linell
Linell / .phoenix.js
Last active August 29, 2015 14:03
My dotfile for Phoenix - (https://github.com/sdegutis/Phoenix).
/*
▄███████▄ ▄█ █▄ ▄██████▄ ▄████████ ███▄▄▄▄ ▄█ ▀████ ▐████▀
███ ███ ███ ███ ███ ███ ███ ███ ███▀▀▀██▄ ███ ███▌ ████▀
███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███▌ ███ ▐███
███ ███ ▄███▄▄▄▄███▄▄ ███ ███ ▄███▄▄▄ ███ ███ ███▌ ▀███▄███▀
▀█████████▀ ▀▀███▀▀▀▀███▀ ███ ███ ▀▀███▀▀▀ ███ ███ ███▌ ████▀██▄
███ ███ ███ ███ ███ ███ █▄ ███ ███ ███ ▐███ ▀███
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄███ ███▄
▄████▀ ███ █▀ ▀██████▀ ██████████ ▀█ █▀ █▀ ████ ███▄
@lorenzos
lorenzos / android-screen-to-gif.sh
Last active March 30, 2019 21:00
Captures screen from Android device via ADB and makes a 180x320 GIF
#!/bin/bash
# How to install:
# exo-open "http://developer.android.com/sdk/index.html#Other"
# sudo apt-get install libav-tools imagemagick
# wget https://gist.githubusercontent.com/lorenzos/e8a97c1992cddf9c1142/raw/android-screen-to-gif.sh
# chmod a+x android-screen-to-gif.sh
# Help message
function usage() {
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {