Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View singularitti's full-sized avatar
:octocat:
WFH

Qi Zhang singularitti

:octocat:
WFH
View GitHub Profile
@singularitti
singularitti / .brew.jl
Last active April 22, 2024 04:53
Homebrew snippets
using IOCapture
export livecheck, bump_cask_pr
function livecheck(cask)
try
c = IOCapture.capture() do
run(`brew livecheck --cask $cask`)
end
str = c.output
@singularitti
singularitti / extensions.json
Last active April 22, 2024 01:36
VSCode Settings
[
{
"identifier": {
"id": "vscode.bat"
},
"pinned": false,
"preRelease": false,
"version": "1.0.0"
},
{
@singularitti
singularitti / Remedy.json
Last active April 22, 2024 21:48
Remedy iTerm profile
{
"Ambiguous Double Width": false,
"Ansi 0 Color": {
"Alpha Component": 1,
"Blue Component": 0.27058824896812439,
"Color Space": "sRGB",
"Green Component": 0.24705882370471954,
"Red Component": 0.23529411852359772
},
"Ansi 1 Color": {
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active April 22, 2024 01:35
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@wcooley
wcooley / Makefile.dash
Last active August 6, 2021 07:38
Building 3rd Party Sphinx Docs for Dash
# docs/Makefile.dash
include Makefile
PROJECT_NAME = $(shell python ../setup.py --name)
.PHONY: dashdoc
dashdoc:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) -D 'html_theme=epub' $(BUILDDIR)/dashdoc
doc2dash -A -v -n $(PROJECT_NAME) -d $(BUILDDIR)/ -f -I index.html -j $(BUILDDIR)/dashdoc
@echo
@echo "Build finished. The Docset is in $(BUILDDIR)/$(PROJECT_NAME).docset."
@MikeInnes
MikeInnes / startup.jl
Last active February 5, 2023 12:54
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end
@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"
@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
@brantfaircloth
brantfaircloth / sphinx_to_github.sh
Created January 23, 2011 02:40
Sphinx documentation to github gh-pages without submodules
# assume the following directory structure where contents of doc/
# and source/ are already checked into repo., with the exception
# of the _build directory (i,e. you can check in _themes or _sources
# or whatever else).
#
# proj/
# source/
# doc/
# remove doc/_build/html if present