Skip to content

Instantly share code, notes, and snippets.

@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 4, 2024 19:24
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@unbracketed
unbracketed / branch-fu.md
Created April 7, 2015 17:49
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
@prestwich
prestwich / scriptsig.md
Last active May 4, 2024 19:16
But what is a scriptsig?

What is a ScriptSig anyway?

Bitcoin legacy transactions (and Zcash transparent sends) use "ScriptSigs" to prove authorization. A ScriptSig contains the user's signature andm maybe some other information. They let the protocol check that the tx came from someone allowed to spend those Bitcoin. Most users never interact with them directly, and with the advent of SegWit, they're slowly being phased out of Bitcoin. But it's still worth knowing how they work.

Basics

@lirnli
lirnli / Pytorch Wavenet.ipynb
Created October 16, 2017 10:51
Pytorch Wavenet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 4, 2024 19:07
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@nntrn
nntrn / espn-api-list.md
Last active May 4, 2024 19:05
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources

@Fazzani
Fazzani / free_m3u8.m3u
Created July 28, 2018 09:13
Free m3u8 streams
http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8
http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
@henrik-dmg
henrik-dmg / SignInWithAppleFirebaseButton.swift
Last active May 4, 2024 19:01
A SwiftUI wrapper around the new Sign in with Apple button that returns OAuthCredentials directly to login with Firebase
import AuthenticationServices
import CryptoKit
import FirebaseAuth
import Foundation
import SwiftUI
// Adapted from https://firebase.google.com/docs/auth/ios/apple?authuser=0
@available(iOS 14.0, OSX 10.16, tvOS 14.0, *)
@available(watchOS, unavailable)
@nihal111
nihal111 / ntp_update_time.py
Last active May 4, 2024 19:00
A python script to update system time in Windows by attempting to fetch time from multiple NTP servers from a defined list.
import socket
import struct
import sys
import time
import datetime
import win32api
# List of servers in order of attempt of fetching
server_list = ['ntp.iitb.ac.in', 'time.nist.gov', 'time.windows.com', 'pool.ntp.org']