This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function possibilities(numbers, remaining, expression) { | |
if (remaining < 0) { | |
return 0; | |
} else if (remaining === 0) { | |
console.log(expression.join(' + ')); | |
return 1; | |
} | |
var result = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// sss | |
// | |
// Created by Rafael Martins on 2/9/16. | |
// Copyright © 2016 Yahoo Inc. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fetch = require('node-fetch'); | |
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'me', | |
password : 'secret', | |
database : 'my_db' | |
}); | |
connection.connect(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function giphy(word, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'https://api.giphy.com/v1/gifs/translate?api_key=dc6zaTOxFJmzC&s=' + encodeURIComponent(word)); | |
xhr.onreadystatechange = function(e) { | |
if(xhr.readyState === 4) { | |
var url = JSON.parse(e.target.responseText).data.images.fixed_height.url; | |
callback(url); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Completion for grunt | |
# Modified version by snit | |
# place this file at ~/.config/fish/completions/grunt.fish | |
# grunt-cli | |
# http://gruntjs.com/ | |
# | |
# Copyright (c) 2012 Tyler Kellen, contributors | |
# Licensed under the MIT license. | |
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function todo | |
ag $argv "TODO|FIXME|NOTE|CHANGED|@todo" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from timeslice import TimeSlice, TimeSet | |
from datetime import datetime | |
import calendar | |
def monta_grade(): | |
grade = TimeSet() | |
dias_mes = calendar.monthrange(2013, 2)[1] | |
for dia in range(1, dias_mes + 1): | |
grade.append( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from timeslice import * | |
from datetime import datetime, date | |
""" | |
TimeSlice Creation | |
""" | |
slice1 = TimeSlice(start=datetime(2009, 1, 1, 0, 0, 0), | |
end=datetime(2009, 1, 2, 0, 0, 0)) | |
slice2 = TimeSlice(start=datetime(2009, 1, 1, 22, 33, 44), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body{ | |
margin: 0; | |
padding: 0; | |
} | |
#dialog { | |
width: auto; | |
top: 50px; | |
left: 50px; | |
right: 50px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="dialog"> | |
<div id="navegacao"></div> | |
<div id="cabecalho"></div> | |
<div id="conteudo"></div> | |
<div id="rodape"></div> | |
</div> |
NewerOlder