Skip to content

Instantly share code, notes, and snippets.

View UniIsland's full-sized avatar

Huang, Tao UniIsland

View GitHub Profile
jaibeee /
Last active February 15, 2024 22:49
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

# Automate mysql secure installation for debian-baed systems
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
UniIsland /
Last active September 22, 2021 09:28
Mnemonic Wordlist

This word list is recommended by in the article A Proper Server Naming Scheme.


Choose a word at will from the word list below.

The easiest way to randomly get a word from the wordlist on Linux is:

shuf -n 1 $FILENAME
Ichag / preseed.cfg
Created December 17, 2013 19:19
Debian 7.2 preseed.cfg with focus on a virtualbox development environment.
## Options to set on the command line
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_GB.UTF-8
# Optionally specify additional locales to be generated.
d-i localechooser/supported-locales multiselect en_US.UTF-8, de_DE.UTF-8
# Keyboard selection.
# keymap is an alias for keyboard-configuration/xkb-keymap
d-i keymap select de
willurd /
Last active July 19, 2024 02:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
equivalent /
Last active December 16, 2021 16:34
String "false" to_bool ... or how to convert Rails/SimpleForm radio buttons to boolean

This gist was writen in 2012 and it was solving specific problem in Rails & SimpleForm. Some fellow developers were pointing out this may be out dated concept. That's why I advise everyone to read comment section bellow to have a full grasp of alternative solutions

other sources that may be helpful to understand why this may not be best idea:

UniIsland /
Created August 14, 2012 04:01
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.
robcowie / print_github.js
Created June 15, 2012 16:25
Github print styling bookmarlet
joakimk / graphite.rb
Created January 25, 2012 20:14
Graphite client for ruby with specs
require 'socket'
class Graphite
def initialize(host)
@host = host
def socket
return @socket if @socket && !@socket.closed?
@socket =, 2003)