Skip to content

Instantly share code, notes, and snippets.

View Deadlyelder's full-sized avatar
💭
I may be slow to respond.

Sankalp Deadlyelder

💭
I may be slow to respond.
View GitHub Profile
@Deadlyelder
Deadlyelder / lightning-txs.md
Created June 23, 2020 18:16
Lightning transactions: from Zero to Hero
@Deadlyelder
Deadlyelder / Github_search_commits.py
Created July 20, 2018 09:39 — forked from o8r/Github_search_commits.py
Add /search/commits to pygithub
# Define search function because pygithub does not support /search/commits API yet.
import github
def __Github_search_commits(self, word, sort=github.GithubObject.NotSet, order=github.GithubObject.NotSet, **kwargs):
"""
:calls: `GET /search/commit`
:param str word: string search keyword
:param str sort: string ('author-date', 'commiter-date') (default: best match)
:param str order: string ('desc', 'asc') (default: 'desc')
:param dict kwargs: dictionary including query parameter set
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit`
@Deadlyelder
Deadlyelder / tf-env.sh
Last active January 3, 2018 20:53
install tensorflow via virtualenv
#!/bin/bash
TF="tensorflow"
TF_VER="1.4.0"
TF_DIR="$HOME"
ENV_NAME="tf-env"
GREEN="\033[0;32m"
RESET="\033[0m"
@Deadlyelder
Deadlyelder / .bash_profile
Created October 27, 2017 13:45 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@Deadlyelder
Deadlyelder / bitcoin_spv_wallet_overview.md
Created October 19, 2017 10:57 — forked from TOMOAKI12345/bitcoin_spv_wallet_overview.md
Bitcoin SPV Wallet Flow Overview

@Deadlyelder
Deadlyelder / sendRawEth.c
Created July 23, 2017 07:02 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@Deadlyelder
Deadlyelder / feistel.py
Created June 18, 2017 13:34 — forked from whatisaphone/feistel.py
Unlimited length feistel cipher
import hashlib
class FeistelSHA1:
rounds = 4 # 4 rounds is sufficient as long as the round function is cryptographically secure
split = 1 / 2
def __init__(self, key, rounds=rounds):
self.subkeys = [hashlib.sha1(bytes((i,)) + key).digest() for i in range(rounds)]
#! /bin/bash
set -euo pipefail
# This script will remove automatic association for all networks not listed in the whitelist
# passed as the first argument. Passwords will NOT be removed from the Keychain.
#
# Alternatively, you can untick "Remember networks" in Network Preferences > Wi-Fi > Advanced,
# but then you won't be able to auto-join networks even temporarily, and you might already
# have a long list to go through.
#