Skip to content

Instantly share code, notes, and snippets.

View zeuxisoo's full-sized avatar
🛥️
No response

Zeuxis zeuxisoo

🛥️
No response
View GitHub Profile
@zeuxisoo
zeuxisoo / updateTargetBaseOnSource.js
Created March 31, 2021 10:51
Update target base on source for testing
// Data
const source = {
"name" : "tom",
"age" : 12,
"sex" : "male",
"car" : false,
"house" : ""
};
const target = {
@zeuxisoo
zeuxisoo / gist:ccb9672be4eda930a897260fcc89cbe5
Created February 18, 2021 07:47
Redirect www to mbasic when meet facebook com in url for Greasemoney / Tampermonkey
// ==UserScript==
// @name Redirect to mbasic facebook
// @namespace https://www.facebook.com/
// @version 0.1
// @description try to redirect to mbasic facebook
// @author Zeuxis Lo
// @match *://www.facebook.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@zeuxisoo
zeuxisoo / start-radio.sh
Last active August 14, 2018 06:37
Start the radio stream in IINA application
#!/bin/bash
# ===========================================
# Find output-device: mpv --audio-device=help
# ===========================================
IINA_CLI="/Applications/IINA.app/Contents/MacOS/iina-cli"
OUTPUT_DEVICE="coreaudio/AppleHDAEngineOutputDP:3,0,1,1:0:{0C41-C0C6-00000F4C}"
VOLUME=65
@zeuxisoo
zeuxisoo / guess-number.go
Last active September 25, 2019 21:42
A simple program ask user to guess the number
package main
import (
"os"
"fmt"
"bufio"
"strings"
"strconv"
"time"
"math/rand"
@zeuxisoo
zeuxisoo / README.md
Last active October 7, 2016 06:55
Testing script for connect to db2 (10.5.5)

Directory structure

- lib/db2jcc.jar
- lib/db2jcc_license_cu.jar
- Test.java

Comple and Run

javac -cp "lib/*:." Test.java && java -cp "lib/*:." Tes
@zeuxisoo
zeuxisoo / gist:0b21a30749f33c46e7e6
Created May 6, 2015 11:24
Rename remote branch name
git branch new-branch-name origin/old-branch-name
git push origin --set-upstream new-branch-name
git push origin :old-branch-name
@zeuxisoo
zeuxisoo / package.json
Created April 28, 2015 12:49
Simple script for fetch and save the word definition to local html file in console
{
"dependencies": {
"async": "^0.9.0",
"cheerio": "^0.19.0",
"datauri": "^0.6.0",
"unirest": "^0.4.0"
}
}
@zeuxisoo
zeuxisoo / app.js
Created April 26, 2015 04:07
A simple ionic sign in test app
;(function() {
angular.module('zzzApp', ['ionic']).config(function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('signin', {
url: '/signin',
templateUrl: 'template/signin.html',
controller: SignInController
})
.state('home', {
url: '/home',
@zeuxisoo
zeuxisoo / mysql.sh
Last active May 22, 2016 12:57
mysql.sh (start, stop, restart, force-quit and status)
#!/bin/bash
PREFIX=/usr/local/mysql
MYSQL_CONFIG=${PREFIX}/my.cnf
MYSQL_PORT=3306
MYSQL_USERNAME="root"
MYSQL_PASSWORD="password"
MYSQLD_SAFE=${PREFIX}/bin/mysqld_safe
@zeuxisoo
zeuxisoo / php-fpm.sh
Last active October 25, 2018 17:19
php-fpm.sh (start,stop,restart,reload,test,status)
#!/bin/sh
PREFIX=/usr/local/php
PHP_FPM_BIN=${PREFIX}/sbin/php-fpm
PHP_FPM_CONF=${PREFIX}/etc/php-fpm.user.conf
PHP_FPM_PID=${PREFIX}/pid/php-fpm.user.pid
PHP_OPTIONS="--fpm-config $PHP_FPM_CONF"