Skip to content

Instantly share code, notes, and snippets.

View nevrending's full-sized avatar
🍰
The cake is a lie.

Yefta Sutanto nevrending

🍰
The cake is a lie.
View GitHub Profile
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@nevrending
nevrending / pyjwt.md
Last active January 25, 2023 11:54
JWT Authentication in Python

Notice

Originally did this research during my work for Bitwyre. I'm now open-sourcing this and hope this helps anyone who finds it, please let me know by commenting if this did help you!

JWT on Python

The access_token produced by Auth Server (a token grant OAuth2.0) is actually a JWT token itself, but is using a different length and algorithm than your typical JWT.

It is using RS256 rather that the common HS256 algo.

Keybase proof

I hereby claim:

  • I am nevrending on github.
  • I am yefta (https://keybase.io/yefta) on keybase.
  • I have a public key ASBvhzYm1tspvWx2pzYKfqRtD4OAAJi5ArcsY21y6shx5Ao

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 18kNkKedmDCqkkxxsoHB2zwNTTy1H6sTSS https://explorer.blockstack.org/address/18kNkKedmDCqkkxxsoHB2zwNTTy1H6sTSS
@nevrending
nevrending / 00_ha_dnscrypt_proxy_client_setup.markdown
Last active February 13, 2017 15:09
Highly-available dnscrypt-proxy client setup on OSX with DNSSEC.

Tested, works!

Install

git clone https://gist.github.com/cc4db2d4d62edd55e31ac1e2008f3ba4 --depth=1 && cd cc4db2d4d62edd55e31ac1e2008f3ba4 && sh install.sh && cd .. && rm -rf cc4db2d4d62edd55e31ac1e2008f3ba4

Uninstall

git clone https://gist.github.com/cc4db2d4d62edd55e31ac1e2008f3ba4 --depth=1 && cd cc4db2d4d62edd55e31ac1e2008f3ba4 && sh uninstall.sh && cd .. && rm -rf cc4db2d4d62edd55e31ac1e2008f3ba4

@nevrending
nevrending / ANIME.txt
Created April 28, 2016 14:35
WD MBL 3TB ANIME List
[1997] Princess Mononoke [720p].mkv
[Anime-Koi] Neppu Kairiku Bushi Road [h264-720p][BEE09BC2].mkv
[Anime-Koi] Soredemo Sekai wa Utsukushii [h264-720p]
[AnonSubs] Psycho-Pass THE MOVIE (1920x1080 x265 AAC&FLAC)(sub eng jpn chi).mkv
[BakaWolf-m.3.3.w] H2O - Footprints in the Sand - H264
[CBM]_The_Legend_of_Heroes_-_Trails_in_The_Sky_(720p)_[829959B0].mkv
[CCS]Naruto_Movie-The_lost_tower_[1280x576][3B98C8A0].mkv
[CMS] Hourou Musuko [TV][720p]
[CMSSide] Black?Rock Shooter OVA [720p 24bit-FLAC][80D8861E].mkv
[Coalgirls-Chihiro]_Hidan_no_Aria_(1280x720_Blu-Ray_FLAC)
@nevrending
nevrending / MOVIE.txt
Created April 28, 2016 14:33
WD MBL 3TB MOVIE List
007
127 Hours
17 Again
2012
3 Idiots
5 Days of War
A Beautiful Mind
A Sandler - Bedtime Stories
A Sandler - Fifty First Dates
Act of Valor
@nevrending
nevrending / Install_CKAN_on_OSX10.10.5.txt
Last active November 6, 2015 06:25
Installing CKAN on OSX 10.10.5
Reference: https://github.com/ckan/ckan/wiki/Installing-CKAN-2.2.1-on-Mac-OS-X-10.10.1
0. Homebrew, python27, git, wget; xcode command line tool, java JDK 6+
1. http://blog.bolshchikov.net/post/50277857673/installing-tomcat-on-macos-with-homebrew
2. pip install mercurial
3. pip install virtualenv
4. brew install postgres
4a.initdb /usr/local/var/postgres -E UTF8
To have launchd start postgresql at login: