This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adblock script for OpenWRT | |
# (c) 2015 by Roy Zuo | |
# | |
# This is another adblocker script for OpenWRT. Simply run this script as a | |
# daily cronjob on your OpenWRT-router. This works since OpenWRT | |
# revision 39312 [1] and does not manipulate any files in /etc/. | |
# Instead, this adds the adblock serverlist as a separate file | |
# to /tmp/. | |
# | |
# Use this file with Unbound DNS resolver. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# to restore: | |
# gunzip XXX.db.gz | |
# dokku postgres:import <dbname> < XXX.db | |
# directory to save backups in, must be rwx by postgres user | |
BASE_DIR="/var/backups/postgres" | |
YMD=$(date "+%Y-%m-%d") | |
DIR="$BASE_DIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
for i in *; do | |
echo $i | |
cat $i |awk "/^$1/ { s=1 }; s == 1; s==1 && /^}/ { s=0 }" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SFreadability | |
// @namespace http://tampeGonkey.net/ | |
// @version 0.96 | |
// @history 0.96 add back "close case" button | |
// @history 0.95 some UI adjustments | |
// @history 0.94 some UI adjustments | |
// @history 0.93 make word breaking less aggressive | |
// @history 0.92 more UI adjustments | |
// @history 0.91 many inline image display fixes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# | |
# Vagrantfile to bring up one or more VM for testing purposes. | |
# | |
# Environment Variables: | |
# | |
# LAB_MACHINES: Number of machines, ignored if `machines.yml` exits | |
# LAB_MEMORY: Memory in GB each machine, default: 1, ignored if `machines.yml` exists | |
# LAB_CPU: Number of CPU each machine, default: 1, ignored if `machines.yml` exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SFComment | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Some SF comment window hacks | |
// @author roylez | |
// @include https://canonical*.visual.force.com/servlet/servlet.Integration* | |
// @license MIT | |
// @require https://code.jquery.com/jquery-2.2.4.min.js | |
// @updateURL https://gist.github.com/8633e9b59406030f9c297b3e54e97e7b/raw/SFComment.user.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name B525s-65a_show_DNS | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Show DNS settings on Optus Huawei B525s-65a | |
// @author You | |
// @match http://192.168.0.1/html/dhcp.html | |
// ==/UserScript== | |
(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# clean up | |
rm -rf ~/Downloads/wallpaper*.jpg | |
# <div class="img_cont" style="background-image: url(/th?id=OHR.SpeedFlying_EN-AU4701306692_1920x1080.jpg&rf=LaDigue_1920x1080.jpg)"> | |
URL=https://bing.com | |
img=$HOME/Downloads/wallpaper-$(date +%Y%m%d).jpg | |
img_path=$( curl --silent -L $URL | sed -n 's:.*rel="preload" *href="\(/th[^&]*.jpg\)&.*:\1:p' ) | |
img_url=${URL}${img_path} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer