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 | |
sudo apt-get update | |
sudo apt-get install curl | |
curl -L get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm requirements | |
rvm install ruby 2.1.0 |
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
<snippet> | |
<content><![CDATA[<%t '$1' %>]]></content> | |
<!-- Optional: Tab trigger to activate the snippet --> | |
<tabTrigger>ts</tabTrigger> | |
<!-- Optional: Scope the tab trigger will be active in --> | |
<!-- Optional: Description to show in the menu --> | |
<description>Polyglot HTML</description> | |
</snippet> |
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
<snippet> | |
<content><![CDATA[polyglot.t('$1')]]></content> | |
<!-- Optional: Tab trigger to activate the snippet --> | |
<tabTrigger>ps</tabTrigger> | |
<!-- Optional: Scope the tab trigger will be active in --> | |
<!-- Optional: Description to show in the menu --> | |
<description>Polyglot JS</description> | |
</snippet> |
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
Backbone.Form.editors.PhoneNumber = Backbone.Form.editors.Text.extend({ | |
initialize: function(options) { | |
Backbone.Form.editors.Text.prototype.initialize.call(this, options); | |
this.$el.on('keyup', function(e){ | |
var input = $(e.currentTarget); | |
input.val(input.val().replace(/[^\d]/g, '')); | |
var digits = input.val(); | |
if (e.which == 8 && digits.length <= 3) { | |
return; |
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 | |
if [ "$1" != "work" ] && [ "$1" != "home" ]; | |
then | |
echo "Wrong arguments Usage: $0 home|work" | |
exit $E_BADARGS | |
fi | |
interface_file='/etc/network/interfaces' | |
work_config_start=`grep -n "#work config start" $interface_file | awk -F':' '{print $1}'` |
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 | |
if [ "$1" != "work" ] && [ "$1" != "home" ]; | |
then | |
echo "Wrong arguments Usage: $0 home|work" | |
exit 65 | |
fi | |
work_test_regex="^10" | |
home_test_regex="^192" |