Skip to content

Instantly share code, notes, and snippets.

View sheeeng's full-sized avatar
🐡
It's Tuesday! ٩(× ×)۶

Leonard Sheng Sheng Lee sheeeng

🐡
It's Tuesday! ٩(× ×)۶
View GitHub Profile
@sheeeng
sheeeng / gist:97732a9facb0cf2f79959f8e30110d39
Created November 7, 2017 10:16 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sheeeng
sheeeng / howto-filemerge-git-osx.md
Created November 30, 2017 13:15 — forked from bkeating/howto-filemerge-git-osx.md
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

@sheeeng
sheeeng / gdiff
Created November 30, 2017 13:15 — forked from miner/gdiff
using FileMerge as git difftool on Mac OS X
#!/bin/bash
# my git difftool, calls FileMerge with project as -merge target
# better than using opendiff
#
# cd to your project dir and and run difftool like this:
# git difftool -d -x gdiff
# find top level of git project
dir=$PWD
until [ -e "$dir/.git" ]; do
@sheeeng
sheeeng / modify-pom.py
Last active December 23, 2017 17:32 — forked from kennedyj/parse-pom.py
quick maven pom parser for group, artifact, and version
#!/usr/bin/env python3
import datetime
import subprocess
def get_git_revision_hash():
return subprocess.check_output(['git', 'rev-parse', 'HEAD']).decode('utf-8')
def get_git_revision_short_hash():
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
echo "Getting Dump1090-Mutability Latest Package..."
curl -sL https://api.github.com/repos/mutability/dump1090/releases/latest \
    | grep 'armhf.deb' \
 | cut -d : -f 2,3 \
@sheeeng
sheeeng / cloudSettings
Created June 6, 2018 20:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-04-30T23:24:55.941Z","extensionVersion":"v2.9.0"}
@sheeeng
sheeeng / Jenkinsfile
Created August 3, 2018 08:20 — forked from oifland/Jenkinsfile
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@sheeeng
sheeeng / Install NVIDIA Driver and CUDA.md
Created August 14, 2018 12:49 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
#!/bin/bash
sudo qemu-img create -f qcow2 /home/username/$1.img 250G &&
sudo virt-install \
--name $1 \
--boot uefi \
--machine q35 \
--ram 16384 \
--vcpus 2 \
@sheeeng
sheeeng / Jenkinsfile.groovy
Created August 29, 2018 12:19 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER'
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"'
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"'
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"'
echo 'Using three backslashes still results in preserving the single quotes'