Skip to content

Instantly share code, notes, and snippets.

View zilongshanren's full-sized avatar
🎯
Focusing

子龙山人 zilongshanren

🎯
Focusing
View GitHub Profile
@jonaharagon
jonaharagon / renew-certs
Last active February 16, 2017 04:41 — forked from thisismitch/le-renew-webroot
Auto Renewal Script for Let's Encrypt and Discourse (@ DigitalOcean)
#!/bin/bash
web_service='nginx'
config_file="/opt/letsencrypt/settings.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@bishboria
bishboria / springer-free-maths-books.md
Last active September 25, 2025 06:28
Springer made a bunch of books available for free, these were the direct links
@oc2pcoj
oc2pcoj / Good IOS RTSP Player.md
Last active July 31, 2025 07:19
iOS RTSP player for IP video cameras
@dannycastonguay
dannycastonguay / arch_vbox.md
Last active September 16, 2025 01:14
Installing Arch Linux on VirtualBox in Windows 10 for beginners

Installing Arch Linux on VirtualBox in Windows 10

I recently upgraded to a new system, and instead of running Arch Linux natively I've decided to run it inside VirtualBox on Windows 10. Below I note down the steps I took, which closely follow the excellent wiki pages of archlinux. But along the way, I also noted a few other steps steps I took to make this system very comfortable, which you'll have to figure out for yourself if you like them or not!

Setting up Windows 10 to be ready

There isn't much of preparation required, given that I started from scratch, but I did have to setup my windows environment a little bit.

  1. Install the windows package manager chocolatey
  2. Install qBittorrent (which will be used to download an iso copy of arch) by running the following command from the command line choco install qbittorrent (recommended to run the command line as an adm
@loderunner
loderunner / 01-mac-profiling.md
Last active July 31, 2025 17:31
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity:

@caiorss
caiorss / macros.el
Last active September 14, 2022 00:18
Emacs Lisp/Elisp Macro Examples
;; Elisp session in REPL IELM
;;
;;
;;
ELISP> (defmacro inc (var)
(list 'setq var (list '1+ var)))
inc
ELISP> (setq x 0)
0 (#o0, #x0, ?\C-@)
@ohanhi
ohanhi / frp.md
Last active September 23, 2025 16:12
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@GregLukosek
GregLukosek / TexturePostProcessor
Last active May 23, 2023 05:12
Custom Texture Importer for Unity
//Greg Lukosek 2015
//[email protected]
using UnityEngine;
using UnityEditor;
public class TexturePostProcessor : AssetPostprocessor
{
void OnPostprocessTexture(Texture2D texture)
@Pitometsu
Pitometsu / super.el
Last active August 29, 2015 14:19
Super key usage in my EMACS config.
;; mac os x style
(global-set-key (kbd "s-S") 'write-file)
(global-set-key (kbd "s-s") 'save-buffer)
(global-set-key (kbd "s-i") 'dired-jump-other-window)
(global-set-key (kbd "s-l") 'goto-line)
(global-set-key (kbd "s-q") 'save-buffers-kill-emacs)
(global-set-key (kbd "s-x") 'kill-region)
(global-set-key (kbd "s-c") 'kill-ring-save)
(global-set-key (kbd "s-v") 'yank)
(global-set-key (kbd "s-a") 'mark-whole-buffer)