Skip to content

Instantly share code, notes, and snippets.

View plusjade's full-sized avatar
🐵
🚀 🤖

Jade Dominguez plusjade

🐵
🚀 🤖
View GitHub Profile
@plusjade
plusjade / gist:5681493
Last active December 17, 2015 22:19
custom skills
# Custom skills (previously "skill Groups")
CustomSkills = [
{
"name"=> "web",
"all"=>["HTML", "CSS"],
"any"=>["Javascript", "CoffeeScript", "PHP", "Ruby", "ASP", "Go"],
},
{
"name"=> "frontend-developer",
"all"=>["HTML", "CSS"],
{ "hello" : "jade" }
// array style, just list the damned questions!
var questions = [
{
question: "What color is Pikachu?",
answers: ["Light Blue", "Brown", "Yellow", "Green"],
solution: "Yellow"
}
,
{
question: "What color is Squirtle?",
@plusjade
plusjade / international-support.json
Last active December 21, 2015 18:29
Elasticsearch-ing How I make sense of what the hell is going on in ES. Essentially a "control test" environment. Validate the minimum possible use-case, then iterate by one factor. Note I don't have any comments in there because you can copy and paste the entire top half into console and it will run in sequence.
curl -XDELETE 'http://localhost:9200/p'
curl -XPOST 'http://localhost:9200/p' -d '
{
"index" : {
"analysis" : {
"analyzer" : {
"default_index" : {
"tokenizer" : "standard",
"filter" : ["lowercase", "asciifolding", "mynGram"],
// model View
Gild.Views.ProfileTag = Backbone.View.extend({
model: Gild.Models.Tag,
tagName: "li",
initialize: function(attrs) {
this.model.bind("change", this.render, this);
this.model.bind("destroy", this.remove, this);
},
@plusjade
plusjade / config.yml
Created September 8, 2013 18:54
Sample http://ruhoh.com configuration file.
---
# Usage: http://ruhoh.com
# This helps parsers (and hosting platforms) determine which version is needed to compile your site.
# If you compile your blog yourself, setting this won't matter, but it's a nice thing to keep updated.
RuhohSpec: "2.1"
# Used for things like RSS that need the full URL to a given resource.
# This DOES NOT affect any of your paths or links in any way.
# This DOES NOT configure domain mapping. See post2.ruhoh.com for hosting options.
{
"login": "plusjade",
"data": {
"version": "2",
"market-value": {
"score": 3.04,
"confidence": 0.6,
"explain": [
{
"name": "CompaniesRank",
@plusjade
plusjade / folder_tree.rb
Last active December 23, 2015 07:59
Mustache block helper to quickly build folder tree heirarchies in HTML. The output uses nested unordered HTML lists. Example: http://ruhoh.com/docs/2/javascripts/ Usage: Place this in "./my-site/plugins/folder_tree.rb" then reload your web-server session. See inline documentation for syntax.
module FolderTree
# Mustache block helper to quickly build folder tree heirarchies in HTML.
# The output uses nested unordered HTML lists.
#
# Usage:
# {{# folder_tree }}
# pages
# about.md
# posts
# essays
@plusjade
plusjade / pages_random.rb
Last active December 23, 2015 08:09
Ruhoh plugin to pragmatically get a list of n random pages from an arbitrary pages collection.
# ./my-blog/plugins/pages_random.rb
module PagesRandom
# Return n random page objects.
# Limit can be set in config.yml:
# pages:
# random_limit: 10
def random
limit = config['random_limit'].to_i
limit = limit > 0 ? limit : 5
@plusjade
plusjade / github.rb
Created September 23, 2013 06:41
GitHub Pages publishing strategy for ruhoh v2.5
require 'tmpdir'
# Usage:
# add to ruhoh-site/plugins/publish/github.rb
# - Your GitHub remote must be setup properly but The command will try to walk you through it.
# - You must have a clean working directory to publish to GitHub pages since the hook is actually triggered by commits.
#
# $ cd ruhoh-site
# $ bundle exec ruhoh publish github
class Ruhoh