Skip to content

Instantly share code, notes, and snippets.

View jyyan's full-sized avatar
:octocat:
I may be slow to respond.

Luke, JunYuan Yan jyyan

:octocat:
I may be slow to respond.
View GitHub Profile
# Built application files
/*/build/
build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
<?php
/**
* php-ansi-color
*
* Original
* https://github.com/loopj/commonjs-ansi-color
*
* @code
* <?php
* require_once "ansi-color.php";
@jyyan
jyyan / install-php7.2-mcrypt.sh
Created June 9, 2018 10:01 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
## How to install mcrypt in php7.2
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
##
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
@jyyan
jyyan / nginx_cors_s3_upload_proxy_full
Created November 1, 2018 18:36 — forked from zefer/nginx_cors_s3_upload_proxy_full
My nginx config to allow CORS (cross-site) uploads to Amazon S3, with added config e.g. timeouts & security
# DO NOT RESPOND TO REQUESTS OTHER THAN yourdomain.com
server {
listen 80 default;
server_name _;
return 444;
}
# FILE UPLOADS
server {
listen 80;
@jyyan
jyyan / gist:0b6e4ed38560aa60a31f26a277f53668
Created September 4, 2020 16:44 — forked from Luoyayu/gist:3c5f099dd1a453f049fced1df7bc7964
extract Xcode.xip to a customed volume
By default, when extracts the Xcode.zip,
macos will create tmp file in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/com.apple.AUHelperService`.
Sometimes, the /private has no ehough space to hold 19GB Xcode.app.
Thus we can create a soft link named `com.apple.AUHelperService` in the tmp dir.
Steps:
1. BACKUP `com.apple.AUHelperService` in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/` to `com.apple.AUHelperService_BACKUP`
2. mkdir named `com.apple.AUHelperService` wherever you have enough space,
3. ln -s /your/absolute/path/com.apple.AUHelperService /private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T
4. double click the Xcode.xip
@jyyan
jyyan / clean.sh
Created September 3, 2021 09:11 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs