Skip to content

Instantly share code, notes, and snippets.

View cactis's full-sized avatar

chitsung.lin cactis

View GitHub Profile
@cactis
cactis / awesome-nginx.conf
Created March 8, 2023 01:57 — forked from vjt/awesome-nginx.conf
*AWESOME* nginx configuration for Ruby/Rack web applications
#
# mmm m m mmm mmm mmm mmmmm mmm
# " # "m m m" #" # # " #" "# # # # #" #
# m"""# #m#m# #"""" """m # # # # # #""""
# "mm"# # # "#mm" "mmm" "#m#" # # # "#mm"
#
# nginx configuration For Ruby/Rack web applications
#
# Cooked up with style, care and a bit of *secret*
# nerdy spice. :-)
@cactis
cactis / AdbCommands
Created June 18, 2020 06:39 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@cactis
cactis / AdbCommands
Created June 18, 2020 06:39 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@cactis
cactis / rm_mysql.md
Created July 29, 2019 12:45 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@cactis
cactis / BrewBindInstallAndSetupMacOSX10_10.sh
Created June 6, 2018 06:31 — forked from mpaskalev/BrewBindInstallAndSetupMacOSX10_10.sh
Install and setup bind (named) on Mac OS X 10.10.1 with brew 0.9.5
#!/bin/bash
# Run as root or sudo the commands that need it as you go.
# brew version 0.9.5
# Mac OS X 10.10.1
# A little bit changed version of this:
# http://stackoverflow.com/questions/19538118/osx-mavericks-bind-no-longer-installed-how-to-get-local-dns-server-working
@cactis
cactis / unfollow.js
Created July 21, 2017 12:28 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// 1. Go to https://twitter.com/following.
// 2. Keep scrolling to the bottom repeatedly until all your followers are loaded.
// 3. Run this in your console.
[].slice.call(document.querySelectorAll('.unfollow-text')).forEach(function(button) {
button.click();
});
@cactis
cactis / unfollow.js
Created July 21, 2017 12:28 — forked from cairey/unfollow.js
Unfollow people that do not follow you on Twitter
/* Scroll to the bottom of https://twitter.com/following
Open the Console and run the following
*/
$('.ProfileCard-content').each(function(){var status = $(this).find('.FollowStatus').text();var unfollowButton = $(this).find('.user-actions-follow-button');if(status != 'follows you'){unfollowButton.click();}});
@cactis
cactis / bezier.js
Last active March 9, 2016 12:36 — forked from LiuJi-Jim/bezier.js
De Casteljau Bezier
function DeCasteljauBezier(points, density, step){
//if (points.length < 3) return null;
console.time('bezier');
var ps = points.map(function(p){
return {
x: p.x,
y: p.y
};
}),
results = [],
@cactis
cactis / UILabel+FontSize.Swift
Created February 26, 2016 06:48 — forked from nRewik/UILabel+FontSize.Swift
iOS-Swift adjust font size to fit in rect
//
// UILabel+FontSize.Swift
//
// Created by Nutchaphon Rewik on 7/11/15.
// Copyright (c) 2015 Nutchaphon Rewik. All rights reserved.
//
import UIKit
extension UILabel{
@cactis
cactis / sublime_text3_crack.md
Created February 25, 2016 04:58 — forked from sublime-crack4/sublime_text3_crack.md
Sublime Text crack 3106 3103 Win64 Win32 Linux64 Linux32 OSX Mac MacOS latest

cat

To pupils: all binaries can be downloaded http://pan.baidu.com/s/1ntCChyp

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmers: