Skip to content

Instantly share code, notes, and snippets.

View JamesHopbourn's full-sized avatar

James Hopbourn JamesHopbourn

View GitHub Profile
{"lastUpload":"2021-03-10T22:27:49.206Z","extensionVersion":"v3.4.3"}
@e-roux
e-roux / SafariBookmarkEditor
Last active March 25, 2019 10:54
Mac OS: python module for easily adding, removing, and moving positions of Safari bookmarks in the context of the currently logged in user.
#!/usr/bin/python
#
# From https://github.com/robperc/SafariBookmarkEditor
#
# Revision
# 23/10/2017 - ported to Python 3, PEP8 fixes
#
"""
Python module for easily adding, removing, and moving positions of Safari
@max-mapper
max-mapper / bibtex.png
Last active September 9, 2026 17:52
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@LeoMarX
LeoMarX / gist:ef1fca2c67f04b15fe6a376fa9683232
Created December 19, 2016 08:45
常用计算机词汇表.md
@Liam0205
Liam0205 / demo.tex
Last active May 22, 2025 10:45
demo of moderncv
%!TEX program = xelatex
% Font Size:
% 10pt, 11pt, 12pt
% Paper Size:
% a4paper, letterpaper, a5paper, leagalpaper, executivepaper, landscape
% Font Family:
% roman, sans
\documentclass[12pt, a4paper, roman]{moderncv}
% Style:
@fernandomora
fernandomora / fswatch-rsync
Created September 12, 2016 22:43
Watch folder with fswatch and sync it with rsync
#!/usr/bin/env bash
# check color support
colors=$(tput colors)
if (($colors >= 8)); then
red='\033[0;31m'
nocolor='\033[00m'
else
red=
nocolor=
@aborruso
aborruso / updatefile.sh
Last active November 27, 2024 22:03
How to update a file in github via cURL
#!/bin/bash
cartella="/var/myfolder"
# update the file
curl -i -X PUT -H 'Authorization: token 4d013330xxxxxxxxxxxxxx' -d "{\"path\": \"mattei.csv\", \
\"message\": \"update\", \"content\": \"$(openssl base64 -A -in $cartella/mattei.csv)\", \"branch\": \"master\",\
\"sha\": $(curl -X GET https://api.github.com/repos/username/repo/contents/mattei.csv | jq .sha)}" \
https://api.github.com/repos/username/repo/contents/mattei.csv
@kshiteesh
kshiteesh / urlsafari
Last active December 15, 2025 14:33
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file
@jasonet
jasonet / gist:bc1dfed988bd18cdb33a
Last active December 10, 2020 06:34
Mac下开机自动连接ssh -D(Autossh)
生成公钥文件。Terminal下面输入
ssh-keygen -t rsa
之后在Terminal的提示里按回车。直到生成id_rsa.pub文件,生成的id_rsa.pub文件在 ~/.ssh下面。Terminal下面输入
cd ~/.ssh
cp id_rsa.pub authorized_keys
上面第一句的意思是进入~/.ssh文件夹,第二句是复制id_rsa.pub为authorized_keys文件。