Skip to content

Instantly share code, notes, and snippets.

View sirgatez's full-sized avatar

Joshua Briefman sirgatez

  • ByteDance
  • San Jose, CA
  • 08:25 (UTC -07:00)
View GitHub Profile
@circulosmeos
circulosmeos / easy-litecoin-address-from-public-key.py
Last active November 25, 2023 17:20
Easily generate the litecoin address from the public key using Python (compatible with Python 2 and 3)
#!/usr/bin/env python
# patched from https://bitcoin.stackexchange.com/questions/56923/is-this-how-to-generate-a-bitcoin-address-with-python
# https://en.bitcoin.it/wiki/Protocol_documentation#Addresses
# Adapted to litecoin, following https://bitcoin.stackexchange.com/questions/65282/how-is-a-litecoin-address-generated
import hashlib
import base58
# ECDSA bitcoin Public Key
pubkey = '0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6'
@yangxuan8282
yangxuan8282 / dependencies.txt
Last active April 8, 2019 09:03
archlinux arm xfce4 packages list
# aur
packer
# compile
git
base-devel
# xorg
xorg-server
xf86-video-fbdev
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)
@0de554K
0de554K / mytimer.c
Created January 22, 2018 13:46
Example00: Implementation of non blocking input
/* Non blocking input without ncurses
http://cc.byexamples.com/2007/04/08/non-blocking-user-input-in-loop-without-ncurses/
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
TYP $B3
DSK main.l
SPEAKER EQU $E0C030
HELLO EQU $8000
ORG HELLO
beep LDA SPEAKER
LDY #1000
LDX #1000
@creack
creack / main.go
Created January 7, 2018 17:30 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@devinrhode2
devinrhode2 / README.md
Last active May 30, 2024 01:57 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13,
sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality
that has long been provided by dscl and adds new features available only in 10.13.
sysadminctl can be used to change user passwords, create new users (including automatically provisioning
the user home folder) or check the status of a new-to-10.13 security feature named SecureToken.
SecureToken is a user attribute like password type or user home location. SecureToken is not publicly
documented by Apple so it is not possible to provide a full technical description, but in practice one
needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can
unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active June 6, 2024 13:00
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@devinodaniel
devinodaniel / gist:8f9b8a4f31573f428f29ec0e884e6673
Created November 21, 2017 20:18
Generate SSH RSA Private/Public Key pair with Golang
// This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"golang.org/x/crypto/ssh"