Skip to content

Instantly share code, notes, and snippets.

View zfdang's full-sized avatar
🦊
Focusing

Zhengfa Dang zfdang

🦊
Focusing
View GitHub Profile
@zfdang
zfdang / WindowsMove.ahk
Created June 11, 2022 04:06 — forked from zemax/WindowsMove.ahk
An AutoHotKey script to move & resize windows screen when pressing Win + Alt + Left or Win + Alt + Right. Window moves from 33% Left > 50% Left > 66% Left > 66% Right > 50% Right > 33% Right
;********************************************************************************
; Move Windows by 1/3
;********************************************************************************
MoveCycle(Add) {
static SizeCycle = 0
SizeCycle := Mod(SizeCycle + Add, 6)
if (SizeCycle < 0) {
SizeCycle := SizeCycle + 6
}
@zfdang
zfdang / AutoHotkey.ahk
Created June 11, 2022 03:58 — forked from teglsbo/AutoHotkey.ahk
My AutoHotkey-keyboard shortcut script
;
;My hotkeys (NTJ)
;
;Remap back/forward browser buttons to Windows keys
;*SC16A down::Send, {LWINDOWN}
;*SC169 down::Send, {APPSKEY down}
;*SC16A up::Send, {LWINUP}
;*SC169 up::Send, {APPSKEY up}
@zfdang
zfdang / your-workflow.yml
Last active May 27, 2020 00:01
Ubuntu Runner Disk Cleanup Script - Github Workflow Actions
name: Build_x86_64
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
@zfdang
zfdang / README.md
Created June 3, 2019 02:35 — forked from steve-jansen/README.md
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@zfdang
zfdang / SimpleHTTPServerWithUpload.py
Created May 16, 2019 06:44 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@zfdang
zfdang / EndlessRecyclerOnScrollListener.java
Last active August 13, 2018 03:32 — forked from ssinss/EndlessRecyclerOnScrollListener.java
RecyclerView Supporting Pull Down to Refresh & Pull Up to Load More
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = false; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 2; // The minimum amount of items to have below your current scroll position before loading more.