This file contains 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 python3 | |
""" | |
This is a tool for recovering lost machine units in current model | |
Usage: | |
{0} model-name dest-dir | |
""" | |
# changes summary: | |
# added logic to prevent overwrite /var/lib/juju to avoid removing non-machine units |
This file contains 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
#cloud-config | |
autoinstall: | |
version: 1 | |
early-commands: | |
- snap set system proxy.http="http://192.168.122.1:12345" | |
- snap set system proxy.https="http://192.168.122.1:12345" | |
locale: en_US | |
keyboard: | |
layout: en | |
variant: us |
This file contains 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.11 | |
// @description Workaround negative timecard caused by time drift | |
// @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 |
This file contains 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-modified | |
// @namespace http://tampermonkey.net/ | |
// @version 0.751 | |
// @history 0.751 Merge from roylez's version | |
// @history 0.75 adjust comments section max-width | |
// @history 0.74 Hightlight last update date fields in case listings | |
// @history 0.73 Color code last updated time in case listing | |
// @history 0.721 Add functions to handle console page | |
// @history 0.72 Add call history tab 2020-03-06 (zhouqt) |
This file contains 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
!-- wget https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf | |
!-- for l in `cat accelerated-domains.china.conf`; do echo "||`echo $l|cut -d'/' -f2`" >> gfw_whitelist.txt; done | |
||0-6.com | |
||0-gold.net | |
||00.net | |
||0000738.com | |
||0001688.com | |
||000219.com | |
||0007.net | |
||000dn.com |
This file contains 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/sh | |
ping_test() | |
{ | |
out_iface=$1 | |
target=$2 | |
ping -q -I $out_iface -c $detect_pkt_num -w $detect_timeout $target > /dev/null | |
return $? | |
} |
This file contains 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/sh | |
# Run this script on inside/outside host: | |
# * (outside, do NAT job) set_gre_tunnel.sh out inside_host_ip 192.168.123.1 | |
# * (inside) set_gre_tunnel.sh in outside_host_ip 192.168.123.2 | |
function verify_variant() { | |
var=$1 | |
msg=$2 | |
if [ x$var != x"" ]; then |