Skip to content

Instantly share code, notes, and snippets.

View sheeeng's full-sized avatar
🪸
It's Saturday! ☆*:.。.o(≧▽≦)o.。.:*☆

Leonard Sheng Sheng Lee sheeeng

🪸
It's Saturday! ☆*:.。.o(≧▽≦)o.。.:*☆
View GitHub Profile
@sheeeng
sheeeng / gitpull.ps1
Created December 10, 2014 12:35
Update all one level down local git directories.
$dirs = Get-ChildItem -Path .\* | ?{ $_.PSIsContainer }
$currentDir = Get-Location
# dir env:ProgramFiles`(x86`)
# dir "env:ProgramFiles(x86)"
# ${Env:ProgramFiles(x86)}
# [Environment]::GetEnvironmentVariable("ProgramFiles(x86)")
# & ${Env:WinDir}\notepad.exe
# Invoke-Item ${Env:WinDir}\notepad.exe
@sheeeng
sheeeng / odd_even_numbers.cmd
Created June 23, 2015 10:40
Check even or odd build numbers in Jenkins using Windows batch script.
@echo off
set /a modulo = "%BUILD_NUMBER% %% 2"
if %modulo% == 0 (
echo Even build number.
exit /b 0
) else (
echo Odd build number.
exit /b 1
)
@sheeeng
sheeeng / gist:43927cabddc3c1c103b1
Created October 6, 2015 12:08 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@sheeeng
sheeeng / bb8.py
Created June 18, 2016 11:32 — forked from ali1234/bb8.py
Control Sphero BB-8 from Linux.
#!/usr/bin/env python
# BB-8 Python driver by Alistair Buxton <a.j.buxton@gmail.com>
from bluepy import btle
import time
class BB8(btle.DefaultDelegate):
def __init__(self, deviceAddress):
@sheeeng
sheeeng / index.html
Created July 5, 2016 20:34 — forked from nimbupani/index.html
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@sheeeng
sheeeng / howto-recover-google-authenticator-keys.txt
Created August 31, 2016 23:30 — forked from jbinto/howto-recover-google-authenticator-keys.txt
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases

Keybase proof

I hereby claim:

  • I am sheeeng on github.
  • I am sheeeng (https://keybase.io/sheeeng) on keybase.
  • I have a public key whose fingerprint is 0A83 680A A58B 58F8 9890 5F08 21DC 46F6 C7E2 96E6

To claim this, I am signing this object:

@sheeeng
sheeeng / set_screen_brightness.sh
Created February 10, 2017 11:30
Set screen brightness on Asus UX303LNB with Fedora.
#!/bin/bash
# https://wiki.archlinux.org/index.php/ASUS_Zenbook_UX303
messageUsage="Set screen brightness on Asus UX303LNB with Fedora.
Usage: "$(basename "$0")" (100-825)"
echo "$messageUsage"
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you are not root."
@sheeeng
sheeeng / adb_getprops.sh
Created February 12, 2017 19:35
Get device properties using Android Debug Bridge (adb) command.
#!/usr/bin/env bash
# http://stackoverflow.com/a/31623988
~/Android/Sdk/platform-tools/adb shell getprop | grep "model\|version.sdk\|manufacturer\|hardware\|platform\|revision\|serialno\|product.name\|brand"
@sheeeng
sheeeng / moment.css
Created February 16, 2017 19:20 — forked from bitjockey42/moment.css
Custom CSS file for Moment Firefox plugin
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 100;
src: url(https://github.com/theleagueof/raleway/raw/master/webfonts/raleway_thin-webfont.ttf) format('truetype');
}
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 300;