Skip to content

Instantly share code, notes, and snippets.

View yeahdongcn's full-sized avatar

R0CKSTAR yeahdongcn

View GitHub Profile
@yeahdongcn
yeahdongcn / 📊 Weekly development breakdown
Last active June 19, 2023 01:03
📊 Weekly development breakdown
Docker 6 hrs 16 mins █████████▏░░░░░░░░░░░ 43.8%
Makefile 3 hrs 39 mins █████▎░░░░░░░░░░░░░░░ 25.5%
Go 55 mins █▎░░░░░░░░░░░░░░░░░░░ 6.5%
HTML 45 mins █░░░░░░░░░░░░░░░░░░░░ 5.3%
Python 37 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.4%
@yeahdongcn
yeahdongcn / harbor.sh
Last active February 24, 2022 01:00 — forked from kacole2/harbor.sh
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@yeahdongcn
yeahdongcn / gist:21c10ead7284ca59eac45d445d78e34b
Created July 15, 2019 09:53
Check whether dock is visible
- (BOOL)isDockVisible
{
pid_t pid = 0;
for (NSRunningApplication *runningApp in
[[NSWorkspace sharedWorkspace] runningApplications]) {
if ([[runningApp bundleIdentifier] isEqualToString:@"com.apple.dock"]) {
pid = [runningApp processIdentifier];
break;
}
}
@yeahdongcn
yeahdongcn / gist:aab7c4259fc74c138a4bd1c267fccfb9
Created July 15, 2019 09:01
Dock hidden/shown window properties
Printing description of entry:
{
kCGWindowAlpha = 1;
kCGWindowBounds = {
Height = 1050;
Width = 1680;
X = 0;
Y = 0;
};
kCGWindowIsOnscreen = 1;
@yeahdongcn
yeahdongcn / electron-download cache location
Created October 22, 2018 01:36
If you encounter some checksum failure, probably you'd better to clear the cache and try it again.
Cache location
The location of the cache depends on the operating system, the defaults are:
Linux: $XDG_CACHE_HOME or ~/.cache/electron/
MacOS: ~/Library/Caches/electron/
Windows: $LOCALAPPDATA/electron/Cache or ~/AppData/Local/electron/Cache/
You can set the ELECTRON_CACHE environment variable to set cache location explicitly.
$git archive --format zip --output "./output.zip" master -0
@yeahdongcn
yeahdongcn / gist:2fd11947523e70140b3184b8cf60db00
Created October 15, 2016 05:52
Shell: Create path if it doesn't exsit
# Create path if it doesn't exsit
mkdir -p ${DIR}
@yeahdongcn
yeahdongcn / gist:794b0836dbfc189b2231
Created April 3, 2015 01:58
iPhone Simulator Location
/Users/{YOUR NAME}/Library/Developer/CoreSimulator/Devices/{Identifier}/data/Containers
@yeahdongcn
yeahdongcn / gist:f8752327032101bc8ea4
Created January 21, 2015 13:20
Update git submodules
git submodule foreach git pull origin master
@yeahdongcn
yeahdongcn / system.log
Created September 21, 2014 15:30
Log system out
tail -f /var/log/system.log