Skip to content

Instantly share code, notes, and snippets.

View homerquan's full-sized avatar

Homer Quan homerquan

View GitHub Profile
# Selinux fix for varnish
yum install policycoreutils-python
setsebool -P varnishd_connect_any 1
#!/bin/sh
MyGDomain=YOUR DOMAIN
Username=YOUR NAME
Password=YOUR PASS
CurrWANIP=$(wget http://ipinfo.io/ip -qO -)
echo "Google Domains DDNS: WAN IP Update into:$CurrWANIP"
curl -X POST -d [email protected] -H "User-Agent: curl" -s https://$Username:[email protected]/nic/update?hostname=$MyGDomain&myip=$CurrWANIP
echo "Google Domains DDNS: WAN IP update sent"
@homerquan
homerquan / OpenWithSublimeText2.bat
Created February 2, 2016 15:50 — forked from mrchief/LICENSE.md
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
#!/bin/sh
if [ $# -eq 0 ]; then
/opt/sublime_text_2/sublime_text . > /dev/null 2>&1 &
else
if [ ${1} == "--help" ]; then
/opt/sublime_text_2/sublime_text --help
else
/opt/sublime_text_2/sublime_text $@ > /dev/null 2>&1 &
fi
fi
@homerquan
homerquan / sublime-text-2.sh
Created January 17, 2016 02:52
Install Sublime Text on Fedora.
#!/usr/bin/env bash
# Usage: {script} [ OPTIONS ] TARGET VERSION
#
# TARGET Default target is "/usr/local".
# VERSION If not defined tries to get the build into the Sublime Text 2 website.
#
# OPTIONS
#
# -h, --help Displays this help message.
#
cd /opt/VBoxGuestAdditions-*/init
sudo ./vboxadd setup
cd /usr/local
sudo tar --strip-components 1 -xzf ~/Download/node-v4.2.2-linux-x64.tar.gz
sudo npm upgrade -g
// DO NOT MODIFY EXISITING DOM
var elem = document.createElement('link'); elem.rel = 'import';
elem.href = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'localhost:5000/elements/reflen-widget/reflen-widget.html';
elem.crossorigin = 'anonymous';
document.getElementsByTagName('head')[0].appendChild(elem);
edit "/etc/httpd/conf.d/welcome.conf"
<VirtualHost *:*>
ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
@homerquan
homerquan / designer.html
Last active October 13, 2015 21:47
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../core-tooltip/core-tooltip.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">