Skip to content

Instantly share code, notes, and snippets.

View plusjade's full-sized avatar
🐵
🚀 🤖

Jade Dominguez plusjade

🐵
🚀 🤖
View GitHub Profile
// 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?",
{ "hello" : "jade" }
@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"],
@plusjade
plusjade / log.rb
Last active July 15, 2019 23:08
Custom rails logger
# place in ./config/initializers
# Usage
# LL.warn "blah"
# LL.warn @profile.inspect
require 'pp'
require 'log4r'
require 'log4r/configurator'
require 'log4r/yamlconfigurator'
require 'log4r/outputter/fileoutputter'
@plusjade
plusjade / random-view.html.haml
Created April 16, 2013 18:15
Simple example of rails javascript-in-views refactoring
#share-on-yammer-modal.modal.fade
.modal-header
... blah
- content_for :partial_javascripts do
:plain
Gild.profileView.shareOnYammer(#{ @profile.to_json });
@plusjade
plusjade / keyword-boosting
Created February 19, 2013 18:38
Elasticsearch curl example for ranking by individual token boosts. You can copy this full input and paste it directly into the command-line. Expected results: The result set should be sorted perfectly by the boost value for the skill "ruby". Please note term-frequencies WILL affect scoring and it's only because these documents have the exact sam…
curl -XDELETE 'http://localhost:9200/p'
curl -XPOST 'http://localhost:9200/p'
curl -XPOST 'localhost:9200/p/profile/_mapping' -d '
{
"profile": {
"properties": {
"skills": {
"type": "string",
"omit_term_freq_and_positions" : true,
@plusjade
plusjade / companies.csv
Created February 14, 2013 01:47
csv company dump
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
Yamsafer, "Yamsafer brings the best, fastest & easiest hotel and event online booking experience to the Middle East by offering users innovative shopping experiences at unprecedented prices."
Warby Parker, "Warby Parker was founded with a rebellious spirit and a lofty objective: to create boutique-quality, classically crafted eyewear at a revolutionary price point."
VideoBlocks.com, "Video Blocks is the first subscription-based provider of stock video and audio, providing its members with unlimited download access to a vast, and growing, library of content. VideoBlocks.com offers unlimited access to over 50,000 clips of stock video, motion backgrounds, production music, editing templates, sound effects, special effects and more—all for the price of just one download at many competing sites. Customers range from leading television and movie production networks to pro-sumers and hobbyists looking to enhance their video projects and productions. "
Bigcommerce, "BigCommerce makes it easy to setup your own profess
@plusjade
plusjade / kramdown_converter.rb
Created August 4, 2012 17:44
ruhoh + kramdown
class Ruhoh
module Converter
module Markdown
def self.extensions
['.md', '.markdown']
end
def self.convert(content)
require 'kramdown'
Kramdown::Document.new(content).to_html
end
@plusjade
plusjade / layout.html
Created July 21, 2012 23:48
lightbox.js customization for pragmatically setting options and initializing
<!--
In lightbox.js you need to remove the initialization function call at the bottom.
Lines highlighted here: https://github.com/lokesh/lightbox2/blob/master/js/lightbox.js#L345-349
This is what "starts" lightbox.
Place the initialization function at the bottom of one of your html layouts like so:
-->
<script>
$(function() {
@plusjade
plusjade / Rakefile
Created June 5, 2012 18:44
rake task for upgrading your ruhoh blog from v0.3.0 to v1.0.0-alpha
require 'rubygems'
require 'ruhoh'
require 'yaml'
# ruhoh Upgrade Script
# ruhoh gem upgrade from 0.3.0 to 1.0.0-alpha
# ruhohSpec upgrade from 0.2 to 1.0
#
# How to Use:
# Create a file named 'Rakefile' in the root of your blog directory and place the full contents of this gist inside.