Skip to content

Instantly share code, notes, and snippets.

View dotzero's full-sized avatar
:octocat:

dotzero dotzero

:octocat:
View GitHub Profile
@dotzero
dotzero / keybase.md
Last active June 6, 2017 18:50
keybase.md

Keybase proof

I hereby claim:

  • I am dotzero on github.
  • I am dotzero (https://keybase.io/dotzero) on keybase.
  • I have a public key whose fingerprint is 88D2 6EDB 841D 3DE1 2B1D EA6D 0C2B 5D32 D353 7FE7

To claim this, I am signing this object:

_ =r"""A(W//2,*M(3*G
*G*V(2*J%P),G,J,G)+((M((J-T)
*V((G-S)%P),S,T,G)if(S@(G,J))if(W%
2@(S,T)))if(W@(S,T);H=2**256;import&hash
lib&as&h,os,re,binas cii&as&k;J$:int(k.b2
a_hex(W),16);C$:C(W// 58) +[W%58]if(W@[];X
=h.new("ripemd1 60 ");Y$:h.sha256(W).
digest();I$d=32: I(W//256,d-1)+bytes
([W%256])if(d>0@b""; U$:J(k.a2b_base6
4(W));f=J(os.urandom (64))% (H-U(b"AUVRIxlQ
@dotzero
dotzero / Install_tmux
Created February 22, 2016 10:56 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@dotzero
dotzero / Random bytes, ints, UUIDs in PHP.md
Last active September 9, 2019 22:06 — forked from tom--/Random bytes, ints, UUIDs in PHP.md
PHP random bytes, integers and UUIDs

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )
@dotzero
dotzero / SwiftTerminalScript.swift
Last active July 18, 2020 01:44 — forked from czechboy0/SwiftTerminalScript.swift
Run Terminal Scripts from your Mac app
//
// Script.swift
// Buildasaur
//
// Created by Honza Dvorsky on 12/05/15.
// Copyright (c) 2015 Honza Dvorsky, dotzero. All rights reserved.
//
import Foundation
@dotzero
dotzero / gist:914f634fb8a199bf3760
Created October 7, 2015 10:06 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat

Установка дистрибутива на SD

Raspberry PI SD Installer OS X — простой консольный скрипт для записи любых .img или .iso образов на SD флешки. Использование на OSX или Linux:

sudo ./install ~/Downloads/raspbian.img

Нахождение Raspberry Pi в сети

Подключили ethernet кабель, вставили флешку с Raspbian и запустили, но нет лишнего HDMI монитора и клавиатуры? Выход есть и это — Adafruit Raspberry Pi Finder. Использование на OSX или Linux:

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@dotzero
dotzero / clouddown.py
Last active October 3, 2022 03:26
Download all files from CloudApp
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import json
import urllib
import urllib2
from dateutil.parser import parse