Skip to content

Instantly share code, notes, and snippets.

View ickc's full-sized avatar
💭
I may be slow to respond.

Kolen Cheung ickc

💭
I may be slow to respond.
View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active May 22, 2024 10:51
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@pythoninthegrass
pythoninthegrass / install_mosh_centos7.sh
Created May 25, 2018 23:10
Install mosh on CentOS 7
#!/usr/bin/env bash
# SOURCE: https://eligiblestore.com/blog/2017/05/02/how-to-install-mosh-on-centos/
# ensure running as root
if [[ "$(id -u)" != "0" ]]; then
exec sudo "$0" "$@"
fi
# install mosh
yum install -y epel-release
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 22, 2024 12:43
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@shreevatsa
shreevatsa / pandoc-mathjax-svg-filter.js
Created November 9, 2017 15:07
A Pandoc filter in JS (Node), for converting TeX snippets to SVG using mathjax-node
#!/usr/bin/env node
var pandoc = require('pandoc-filter');
var RawInline = pandoc.RawInline;
var mjAPI = require("mathjax-node");
mjAPI.config({
MathJax: {
// traditional MathJax configuration
}
@gordol
gordol / udp-punch.py
Created October 4, 2017 11:02
Automated Bidirectional UDP NAT Traversal via SSH Wizardry
#!/usr/bin/env python3
"""
This is a 100% self-contained script to facilitate automated creation of bidirectional UDP pinholes.
It should work as a non-root user assuming you use a high port number.
All that is necessary is an SSH server with a Python environment.
This script is ran on the client, and then the client runs it on the server dynamically.
No permanent changes are made to the server.
Basically we just open UDP connection from both ends, to the same port, and then exchange some tokens to verify connectivity.
@udezekene
udezekene / O'Reilly Design Books (Free).md
Last active January 31, 2024 13:15 — forked from augbog/Free O'Reilly Books.md
Download the just released O'Reilly Design Books for free without e-mail signup.

Free O'Reilly Design Books and convenient script to just download them.

HUGE thanks to O'Reilly for making this resource free. Visit the design page if you want to learn more about the design resources. Also, they do have FREE resources for other topics like: Data, IoT, Programming, Security, Web Development, and WebOps.

Thanks @augbog for the initial gist. If you are a developer or looking for software engineering books, headover to the source of this fork.

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active November 26, 2023 12:40
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@cvan
cvan / HOWTO.md
Last active May 16, 2024 00:00
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@TorgeH
TorgeH / gnuize.sh
Last active October 3, 2018 06:14 — forked from clayfreeman/gnuize.sh
GNU-ize Mac OS X El Capitan
#!/bin/bash
PROFILE_FILE=$HOME/.bash_profile
PATH_FILE=$HOME/.bash_path
# Install required packages from Homebrew
brew tap homebrew/dupes
brew install coreutils binutils diffutils ed findutils gawk gnu-indent gnu-sed \
gnu-tar gnu-which gnutls grep gzip screen watch wdiff wget bash gdb gpatch \
m4 make nano file-formula git less openssh python rsync svn unzip vim \
--default-names --with-default-names --with-gettext --override-system-vi \