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
import socket | |
def get_ip_addresses_v2(): | |
return socket.gethostbyname(socket.gethostname()) |
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
# Help with extractions | |
extract () { | |
if [ -f "$1" ] ; then | |
case "$1" in | |
*.tar.bz2) tar xvjf "$1" ;; | |
*.tar.gz) tar xvzf "$1" ;; | |
*.bz2) bunzip2 "$1" ;; | |
*.rar) unrar x "$1" ;; | |
*.gz) gunzip "$1" ;; | |
*.tar) tar xvf "$1" ;; |
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
# My own aliases. | |
alias q='exit' | |
alias c='clear' | |
alias h='history' | |
alias cs='clear;ls' | |
alias p='cat' | |
alias pd='pwd' | |
alias lsa='ls -a' | |
alias lsl='ls -l' | |
alias pd='pwd' |
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
# This is Git's per-user configuration file. | |
[user] | |
name = tzhenghao | |
email = [email protected] | |
[alias] | |
all = add . | |
cl = clone |
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 | |
# This bash script cleans up the build and reinstalls the SDK. | |
# To run this script, do: . test-cli.sh | |
VERSION_NUMBER=$(cat hologram-python/version.txt) | |
cd hologram-python | |
rm -rf dist | |
rm -rf hologram_python.egg-info | |
python setup.py sdist |
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 | |
set -euo pipefail | |
# Author: Zheng Hao Tan | |
# Email: [email protected] | |
# This shell scripts disables mouse acceleration on a MacOS device. | |
echo 'The current mouse scaling value is:' | |
defaults read .GlobalPreferences com.apple.mouse.scaling |
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
<!DOCTYPE html> | |
<head> | |
<meta property="og:image" content="https://www.airlineratings.com/wp-content/uploads/uploads/singapore_airlines_logo-200x.jpg" /> | |
<meta property="og:title" content="Singapore Airlines is giving away Free tickets to celebrate its 70th Anniversary" /> | |
<script type="text/javascript" language="javascript"> | |
var areYouReallySure = false; | |
var internalLink = false; | |
if (typeof window.orientation == 'undefined' && screen.width >= 1000){window.location.href = 'http://google.com'; areYouReallySure=true;} |
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
if (typeof window.orientation == 'undefined' && screen.width >= 1000){window.location.href = 'http://google.com'; areYouReallySure=true;} |
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
<div class="comment"> | |
<img class="profile" src="images/1.png" width="50" height="50" /> | |
<p class="com-txt"><a class="name" href="javascript:void(0);">Rachel Singleton</a> | |
Thank you soo much Singapore Airlines for tickets! i got mine</p> | |
<div class="act"> | |
<a class="fblike" href="javascript:void(0);">Like</a> · | |
<a href="javascript:void(0);">Reply</a> · | |
<span class="liked">50</span> | |
<span class="time">28 mins</span> | |
</div> |