Skip to content

Instantly share code, notes, and snippets.

View squidge's full-sized avatar

Francisco Ruiz A squidge

View GitHub Profile
@squidge
squidge / git.md
Created June 16, 2017 15:45
Git tricks
$ git rm --cached filename
$ git merge <branch-name> —squash —no-commit

##Getting info

Get log since 2 weeks

@squidge
squidge / dotnetcore-cli-cheatsheet.md
Last active June 16, 2017 15:41
A quick guide to use dotnet core CLI

create and cd into app folder

~ $ mkdir myapp && cd app

create new solution file. If no name is specified file is automatically named after the parent folder

~/app $ dotnet new sln 

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@squidge
squidge / mexicution-fc
Created September 1, 2014 10:40
Mexicution FC
{
"team": "Mexicution FC",
"players": [
{ "name": "Foster, B", "club": "WBA" },
{ "name": "Stekelenburg, M", "club": "FUL" },
{ "name": "Santon, D", "club": "NEW" },
{ "name": "Skrtel, M", "club": "LIV" },
{ "name": "Coleman, S", "club": "EVE" },
{ "name": "Jagielka, P", "club": "EVE" },
{ "name": "Hughes, A", "club": "FUL" },
{
"close_windows_when_empty": true,
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/contrast/mellow-contrast.tmTheme",
"draw_indent_guides": false,
"font_face": "Source Code Pro",
"font_options":
[
"subpixel_antialias"
],
"font_size": 16.0,
@squidge
squidge / Gruntfile.js
Created April 4, 2014 21:15
Grunt-Protractor-task
module.exports = function(grunt) {
grunt.initConfig({
protractor_webdriver: {
local: {
options: {
path: '',
command: 'webdriver-manager start',
},
},
@squidge
squidge / node-request-cheerio.js
Last active August 29, 2015 13:57
node-request-cheerio
request('https://news.ycombinator.com', function (error, response, html) {
console.log(response);
if (!error && response.statusCode == 200) {
var $ = cheerio.load(html);
$('span.comhead').each(function(i, element){
var a = $(this).prev();
console.log(a.text());
});
}
});
@squidge
squidge / mg.rb
Last active December 25, 2015 09:09
Ruby and Mongoid
require 'mongoid'
Mongoid.load!("mongoid.yml", environment = "development")
class Artist
include Mongoid::Document
field :name, type: String
embeds_many :instruments
end
@squidge
squidge / SublimeTextSettings
Last active December 22, 2015 02:59
ST3 settings
{
"close_windows_when_empty": true,
"color_scheme": "Packages/daylerees-themes/Laravel.tmTheme",
"draw_indent_guides": false,
"font_face": "Source Code Pro",
"font_options":
[
"subpixel_antialias"
],
"font_size": 15.0,
@squidge
squidge / gist:5675967
Created May 30, 2013 06:03
mongodm models
class Base extends Model {
static $config = "default";
}
class User extends Base {
static $collection = "user";
protected static $attrs = array(
'first_name' => array( 'type' => 'string' ),
'last_name' => array( 'type' => 'string' ),