Skip to content

Instantly share code, notes, and snippets.

View zhanggang807's full-sized avatar
🤗

Dean Zhang zhanggang807

🤗
View GitHub Profile
on run
tell application "Finder" to set aliasItemName to selection as alias
set posixPathName to POSIX path of aliasItemName
return posixPathName
end run
@zhanggang807
zhanggang807 / .ideavimrc
Created March 31, 2023 03:11 — forked from ZhouMoon/.ideavimrc
ideavimr
"____________________________________________________________
"
" /\__\ /\ \ /\ \ /\__\
" /::| | /::\ \ /::\ \ /::| |
" /:|:| | /:/\:\ \ /:/\:\ \ /:|:| |
" /:/|:|__|__ /:/ \:\ \ /:/ \:\ \ /:/|:| |__
" /:/ |::::\__\ /:/__/ \:\__\ /:/__/ \:\__\ /:/ |:| /\__\
" \/__/~~/:/ / \:\ \ /:/ / \:\ \ /:/ / \/__|:|/:/ /
" /:/ / \:\ /:/ / \:\ /:/ / |:/:/ /
" /:/ / \:\/:/ / \:\/:/ / |::/ /
@zhanggang807
zhanggang807 / README-Template.md
Created February 17, 2019 15:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@zhanggang807
zhanggang807 / resize_window.scpt
Created September 29, 2018 05:36 — forked from keflavich/resize_window.scpt
Applescript to resize all windows from a given application. Source credit given in the top.
(*
From http://www.labnol.org/software/resize-mac-windows-to-specific-size/28345/
This Apple script will resize any program window to an exact size and the
window is then moved to the center of your screen. Specify the program name,
height and width below and run the script.
Written by Amit Agarwal on December 10, 2013
*)
@zhanggang807
zhanggang807 / IntelliJ_IDEA__Perf_Tuning.txt
Created August 7, 2018 08:50 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@zhanggang807
zhanggang807 / gist:095c1a93a02f6c32bbdac34873bfea99
Created August 1, 2018 12:04 — forked from fabiofl/gist:5873100
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
@zhanggang807
zhanggang807 / 32.asm
Created May 10, 2017 04:53 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4