Skip to content

Instantly share code, notes, and snippets.

@SimplGy
SimplGy / addFileToGit.js
Last active October 6, 2021 12:38
Usage: `addFileToGit(foo.txt, "some file contents")`. Uses the "octokit" to add a single file to your gitub repo. Adapted from a Ruby guide by http://mattgreensmith.net
const Octokit = require('@octokit/rest'); // https://octokit.github.io/rest.js/
// Customize this stuff:
const auth = 'your-key-generated-in-github-ui'; // PRIVATE!
const owner = 'repo-owner';
const repo = 'your-repo-name';
// Constants
const userAgent = 'git commiter v1';
const ref = 'heads/master';

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@alirobe
alirobe / reclaimWindows10.ps1
Last active June 7, 2024 16:24
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"