Skip to content

Instantly share code, notes, and snippets.

View HaoZeke's full-sized avatar
:octocat:
Gasping for air.

Rohit Goswami HaoZeke

:octocat:
Gasping for air.
View GitHub Profile
@sam217pa
sam217pa / tufte-book.tex
Last active March 2, 2021 21:57
a template to export from org-mode to latex
\usepackage[scaled=0.95]{roboto}
\usepackage{mathpazo}
\linespread{1.05}
\usepackage{eulervm}
\usepackage[usenames]{xcolor}
%% footnote color
\renewcommand{\thefootnote}{\textcolor{Gray}{\arabic{footnote}}}
\makeatletter
@QinMing
QinMing / .zshrc
Last active June 21, 2024 02:06
.zshrc (lazy loading shell functions)
# Copyright (c) 2016-2018 Ming Qin (覃明) <https://github.com/QinMing>
# Open source under MIT LICENSE.
lazy_load() {
# Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.
# E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time
# $1: space separated list of alias to release after the first load
# $2: file to source
# $3: name of the command to run after it's loaded
# $4+: argv to be passed to $3
@gene1wood
gene1wood / analyze_pypi_package_names.py
Last active May 3, 2024 19:34
Analysis of PyPi package names and the use of dashes underscores upper and lower case
try:
import xmlrpclib
except ImportError:
import xmlrpc.client as xmlrpclib
client = xmlrpclib.ServerProxy('https://pypi.python.org/pypi')
packages = client.list_packages()
total = len(packages)
dashes = len([x for x in packages if '-' in x])
/* http://prismjs.com/download.html?themes=prism&languages=sas */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
/* for Lithium messages */
/* a very specific style override for SAS language in a PRE tag */
#lia-body .lia-content .lia-message-body pre.language-sas,
Prism.languages.sas = {
'datalines': {
/* fixed datalines pattern to include datalines4 and possible whitespace before terminating ; */
pattern: /(^|[\r\n])\s*(?:(?:data)?lines|cards|datalines4);[\s\S]+?[\r\n](\s)*;/i,
lookbehind: true,
inside: {
'keyword': {
pattern: /^(\s*)(?:(?:data)?lines|cards|datalines4)/i,
lookbehind: true
},
@danieleggert
danieleggert / GPG and git on macOS.md
Last active March 6, 2025 20:45
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@icyflame
icyflame / to_https.sh
Last active August 10, 2024 22:33 — forked from michaelsilver/fix_github_https_repo.sh
Convert all GitHub git remotes to SSH or HTTPS.
#/bin/bash
#-- Script to automatically convert all git remotes to HTTPS from SSH
# Script will change all the git remotes.
# If you didn't intend to do that, run the other script in this repo.
# Original 1: https://gist.github.com/m14t/3056747
# Original 2: https://gist.github.com/chuckbjones/9dc6634fe52e56ba45ac
# Thanks to @m14t, @michaelsilver and @chuckbjones.
ssh_to_https(){
REPO_URL=`git remote -v | grep -m1 "^$1" | sed -Ene's#.*([email protected]:[^[:space:]]*).*#\1#p'`
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@lukas-h
lukas-h / license-badges.md
Last active May 5, 2025 20:19
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@jesperronn
jesperronn / docx2md.md
Last active November 15, 2024 20:52 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution