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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
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
socketServer.server.removeListener('request', socketServer.server.listeners('request')[0]); //Work around to disable CORS |
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
# tmux cheat sheet | |
(C-x means ctrl+x, M-x means alt+x) | |
## Prefix key | |
The default prefix is C-b. If you (or your muscle memory) prefer C-b, you need to add this to `~/.tmux.conf`: | |
# remap prefix to Control + a |
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
Go to your Cordova Project | |
Root Folder -> CordovaLib -> Right Click CordovaLib.xcodeproj -> Show Package Contents -> Open project.pbxproj | |
Replace all occurrences of (I had 4) | |
buildSettings = { | |
ALWAYS_SEARCH_USER_PATHS = NO;//in 2 out of 4 occurrences | |
"ARCHS[sdk=iphoneos*]" = armv7; | |
"ARCHS[sdk=iphoneos6.*]" = ( |
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
Tmux commands | |
Time to play around with tmux commands: | |
Ctrl-b c Create new window | |
Ctrl-b d Detach current client | |
Ctrl-b l Move to previously selected window | |
Ctrl-b n Move to the next window | |
Ctrl-b p Move to the previous window | |
Ctrl-b & Kill the current window |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" | |
}; | |
}); | |
//factory style, more involved but more sophisticated |
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
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<polymer-element name="my-element"> |
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
sudo apt-get install tightvncserver | |
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak | |
vi ~/.vnc/xstartup | |
----- Enter -- | |
#!/bin/sh | |
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup | |
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources | |
xsetroot -solid grey | |
vncconfig -iconic & | |
x-window-manager & |
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
All you have to do is turn on your computer holding CMD + S. This will boot your Mac in Single-User Mode. Next, you have to wait a second while kernel will load command-line interface. It there is :/ root# line, you’re ready to go! | |
OSX Lion | |
First of all, type | |
# /sbin/fsck -fy | |
This will take a while. It will check the consistency of your filesystem. If there is no error, your output should be similar to this: | |
** /dev/rdisk0s2 | |
** Root file system |