This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I accidently installed some adware from Genieo, and I tried to remove all files but still the safari's address bar search is still defaulted to genieo.com. Google pointed me to this apple support page: https://discussions.apple.com/thread/6021681, which is mainly for people who are not tech savvy. | |
Here is how I fixed it, and it's mainly for people who are comfortable with command line stuff. The culprit is that geneio installed a /etc/launchd.conf, and override some environment variable. Here is a link from thesafemac.com: http://www.thesafemac.com/arg-genieo/. | |
Note that on that page, it's HIGHLY recommended to remove/change the launchd.conf file before changing other files, otherwise the computer may freeze or fail to start due to missing files. | |
A quick fix is to sudo open the /etc/launchd.conf (should be a oneline file), then remove the line referring to /usr/lib/libimckit.dylib or simplify remove this file. A restart should fix the safari search bar issue. You may also want to remove those files listed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://docs.rubygems.org/read/chapter/11 | |
--- | |
gem: --no-ri --no-rdoc | |
benchmark: false | |
verbose: true | |
update_sources: true | |
sources: | |
- http://gems.rubyforge.org/ | |
- http://rubygems.org/ | |
backtrace: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just came across String#chars method, which returns an enumerable. | |
# It's implementation is much simpler than String#split. | |
# A simple benchmark shows that String#chars is much faster than String#split. | |
require 'benchmark/ips' | |
Benchmark.ips do |r| | |
s = "The Snow Queen" | |
r.report('chars') do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 2; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show git branch name in the prommpt | |
function parse_git_branch { | |
#git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
git rev-parse --abbrev-ref HEAD 2> /dev/null | sed -e 's/\(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to generate self-signed ssl certs. | |
# http://dracoblue.net/dev/https-nginx-with-self-signed-ssl-certificate/188/ | |
# A sample server configuration for nginx's emcee.conf | |
server { | |
listen 443; # for Linux | |
ssl on; | |
ssl_certificate /etc/nginx/server.crt; | |
ssl_certificate_key /etc/nginx/server.key; | |
client_max_body_size 4G; |