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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 collections import namedtuple | |
| Pessoa = namedtuple('Pessoa', 'nome idade flag') | |
| pessoas = [('João', 32, False), ('Maria', 21, False), ('Paulo', 50, True)] | |
| pessoas = (Pessoa(*p) for p in pessoas) | |
| print(list(pessoas)) |
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
| <!-- country codes (ISO 3166) and Dial codes. --> | |
| <select name="countryCode" id=""> | |
| <option data-countryCode="GB" value="44" Selected>UK (+44)</option> | |
| <option data-countryCode="US" value="1">USA (+1)</option> | |
| <optgroup label="Other countries"> | |
| <option data-countryCode="DZ" value="213">Algeria (+213)</option> | |
| <option data-countryCode="AD" value="376">Andorra (+376)</option> | |
| <option data-countryCode="AO" value="244">Angola (+244)</option> | |
| <option data-countryCode="AI" value="1264">Anguilla (+1264)</option> | |
| <option data-countryCode="AG" value="1268">Antigua & Barbuda (+1268)</option> |
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
| find . -type f -name "* conflicted copy*" -exec rm -f {} \; | |
| awk '!/conflicted/' .git/packed-refs > temp && mv temp .git/packed-refs |
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
| $scope.checkAll = function(){ | |
| if ($scope.selectedAll) { | |
| $scope.selectedAll = true; | |
| } | |
| else { | |
| $scope.selectedAll = false; | |
| } | |
| angular.forEach($scope.questionnaires, function(form) { | |
| form.selected = $scope.selectedAll; |
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
| #!/bin/bash | |
| #script extraido de: http://paulocassiano.wordpress.com/2008/08/29/deixando-o-gedit-com-a-cara-do-textmate/ | |
| #tip for better "resolution" here: http://blog.siverti.com.br/2008/05/22/fonte-monaco-no-ubuntugedit/ | |
| cd /usr/share/fonts/truetype/ | |
| #TODO: put validation if folder already exists | |
| sudo mkdir ttf-monaco |
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
| $scope.test_data = [ | |
| {"nome": "Fred Chevitarese", "email": "fchevitarese@gmail.com", "plano": "OnDemand"}, | |
| {"nome": "Datagoal", "email": "daniel@datagoal.com.br", "plano": "OnDemand"}, | |
| {"nome": "Fulano", "email": "fulano@somemail.com", "plano": "Free"}, | |
| {"nome": "Siclano", "email": "siclano@somemail.com", "plano": "Free"}, | |
| {"nome": "Beltrano", "email": "beltrano@somemail.com", "plano": "Free"}, | |
| ] | |
| }; |
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
| <!DOCTYPE html> | |
| <html ng-app="CVCuidar"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Cuidar - Lista de contatos</title> | |
| <link rel="stylesheet" href="{{ STATIC_URL }}node_modules/bootstrap/dist/css/bootstrap.min.css"> | |
| {% block extrahead %} |
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> | |
| <title>Test D3js</title> | |
| <head> | |
| <script src="{{ STATIC_URL}}datagoal/node_modules/d3/d3.min.js" charset="utf-8"></script> | |
| <script> | |
| define(['d3', 'wq/pandas'], function(d3, pandas) { | |
| pandas.get('/static/datagoal/node_modules/df1.csv', render); | |
| function render(error, data) { | |
| d3.select('svg') |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # asterisk.py | |
| # | |
| # Copyright 2014 James Finstrom<jfinstrom at gmail> | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or |