Skip to content

Instantly share code, notes, and snippets.

View vigosan's full-sized avatar
🏠
Working from home

Vicent Gozalbes vigosan

🏠
Working from home
View GitHub Profile
@vigosan
vigosan / gist:9357298
Last active August 29, 2015 13:57 — forked from fanktom/gist:1675562
# list
curl -v http://localhost:9292/api/v1/posts
# create
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"login":"foo","password":"bar"}' http://localhost:9292/api/v1/login
# read
curl -v http://localhost:9292/api/v1/posts/1.json
# update
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@vigosan
vigosan / gist:ab91b252fe9ba1141a5d
Created December 11, 2014 20:24
disable zsh git status checks
git config --global oh-my-zsh.hide-status 1
@vigosan
vigosan / install_nvim.sh
Last active February 27, 2018 21:51
Build and install neovim for Debian
#!/usr/bin/env bash
# Build and install neovim for Debian
pushd .
mkdir -p ~/src
cd ~/src
# Install cmake 2.8.10
cmake_package="cmake-3.3.1"
@vigosan
vigosan / rails http status codes
Created October 7, 2015 07:21 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@vigosan
vigosan / simple_authentication.rb
Created May 26, 2016 05:51 — forked from tomdalling/simple_authentication.rb
A simple Sinatra app that demonstrates basic authentication
#!/user/bin/env ruby
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'sinatra', '~> 1.4'
gem 'bcrypt', '~> 3.1'
end
require 'sinatra/base'
@vigosan
vigosan / navigation.js
Created August 28, 2016 07:07 — forked from dmeents/navigation.js
The complete source code for the Creating a collapsible navigation menu in react
import React, { Component } from 'react';
import { Link } from 'react-router';
import classNames from 'classnames';
import MobileNav from 'react-icons/lib/io/navicon-round';
//navigation display
export default class NavContainer extends Component {
constructor(props) {
super(props);
this.state = {
@vigosan
vigosan / webpack.config.js
Created August 31, 2016 18:58 — forked from xpepermint/webpack.config.js
Webpack Common Configuration File (ReactJS)
'use strict';
/**
* Webpack Configuration File
*
* This is a configuration file for Webpack module bundler. You should customize
* it to fit your project.
*
* To start the development server run:
*
@vigosan
vigosan / ultimate-ut-cheat-sheet.md
Created November 6, 2016 16:35 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies