Skip to content

Instantly share code, notes, and snippets.

View tagrudev's full-sized avatar

Todor Grudev tagrudev

View GitHub Profile
@tagrudev
tagrudev / ruby.md
Last active October 22, 2015 07:59
Install Ruby on Ubuntu
sudo apt-get update

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

Now we are ready to install rbenv. The easiest way to do that is to run these commands, as the user that will be using Ruby:

cd
@tagrudev
tagrudev / error
Last active August 29, 2015 14:08
Errors
Jade syntax error: Expected {{else}} or block close for if
{{#if currentUser}}
tagrudev:node-v0.10.32/ $ node -v
v0.10.32
tagrudev:node-v0.10.32/ $ npm -v
1.1.59
tagrudev:node-v0.10.32/ $ npm install yo
npm http GET https://registry.npmjs.org/yo
npm http 304 https://registry.npmjs.org/yo
npm http GET https://registry.npmjs.org/yo/-/yo-1.0.4.tgz
npm http 200 https://registry.npmjs.org/yo/-/yo-1.0.4.tgz
npm ERR! cb() never called!
@tagrudev
tagrudev / ruby.rb
Created August 14, 2014 07:19
Difference ?
RSpec.configuration.include HelperMethods
difference ?
RSpec.configure do |config|
config.include Capybara::DSL
config.include Support::GeneralHelpers
end
@tagrudev
tagrudev / test.rb
Created August 13, 2014 08:11
pseudo
def update
case params["type"]
when password_change
blabla
when email
blab
end
end
Ion.with(mainActivity)
.load("GET", "http://url.com")
.addQuery("type", "something")
.addQuery("radius","50")
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
@Override
public void onCompleted(Exception e, JsonObject result) {
Log.d("TAG", result);
}
Inflector.inflections do |inflect|
inflect.plural 'JSA/SWMS', 'JSA/SWMS'
end

adduser deploy
ssh-copy-id -i ~/.ssh/deploy.pub deploy@example.com

Install rbenv

aptitude install git

http://redcloth.org/

Setup Ubuntu Server

All commands need to be executed as root

sudo su

Server data architecture

public class arrivi extends Fragment {
ListView list;
String[] web = {
"Google Plus",
"Twitter",
"Windows",
"Bing",
"Itunes",
"Wordpress",
"Drupal"