start new:
tmux
start new with session name:
tmux new -s myname
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <string.h> | |
struct entry_s { | |
char *key; | |
char *value; |
CC = gcc -fPIC | |
LDFLAGS = -lm | |
# set DEBUG options | |
ifdef DEBUG | |
CFLAGS = -Wall -Wextra -ggdb -pg -DDEBUG | |
else | |
CFLAGS = -Wall -O2 | |
endif |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
(* EXPORT ALL SKIM NOTES TO EVERNOTE WITH HYPERLINKS | |
-- Stephen Margheim | |
-- 9/7/13 | |
-- open source | |
REQUIRED PROGRAMS: | |
- Skim (pdf viewer and annotator) | |
- Evernote (cloud based note app) |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#InstallKeybdHook | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; OPTIONAL: For those who use Home/End more than PgUp/PgDown, this flips their use with the Fn key. | |
; If you want the buttons to function as they are, add a semicolon (;) to the beginning of each line below. | |
Home::PgUp | |
End::PgDn | |
PgUp::Home |
The plan is to create a pair of executables (ngrok
and ngrokd
) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok
to connect to this ngrokd
, and vice versa.
Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com
, you'll need a record for that and for *.domain.com
.
#list available jdks | |
alias jdks="/usr/libexec/java_home -V" | |
# jdk version switching - e.g. `jdk 6` will switch to version 1.6 | |
function jdk() { | |
echo "Switching java version"; | |
export JAVA_HOME=`/usr/libexec/java_home -v 1.$1`; | |
java -version; | |
} |
find /sdcard/DCIM* -mtime +180 -exec rm {} ";" |
#!/bin/bash | |
# @author JasonLiu | |
# @since 2019/12/25 | |
# @description ping the router,if power shutdown,router will shutdown,ping will fail,if ping fail>N,shutdown NAS | |
# idea first come from http://koolshare.cn/thread-120821-1-1.html | |
# */1 * * * * /share/Project/shell/powerchk.v5.sh >> /share/Project/shell/log/power.log | |
# crontab /etc/config/crontab && /etc/init.d/crond.sh restart | |
function usage() | |
{ |