Instance | Branch |
---|
This file contains 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
// | |
// ColorsUtil.swift | |
// | |
// Created by Vinicius Souza on 5/11/16. | |
// Copyright © 2016 Vinicius Souza. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains 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
package main | |
import ( | |
"log" | |
"myserver" | |
"net/http" | |
) | |
const addr = "localhost:12345" |
This file contains 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
# -*- coding:utf-8 -*- | |
''' | |
Simplistic script to parse the detailed AWS billing CSV file. | |
Script displays cost of S3 operations broken down per region, bucket and usage | |
type (either storage or network). It also sums up the amount of storage used per bucket. | |
Output is filtered wrt to costs < 1$. | |
See http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html for | |
how to set up programmatic access to your billing. |
This file contains 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
func main() { | |
ctx := context.Background() | |
// trap Ctrl+C and call cancel on the context | |
ctx, cancel := context.WithCancel(ctx) | |
c := make(chan os.Signal, 1) | |
signal.Notify(c, os.Interrupt) | |
defer func() { | |
signal.Stop(c) |
This file contains 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 Queue import Queue | |
from threading import Thread | |
class Worker(Thread): | |
"""Thread executing tasks from a given tasks queue""" | |
def __init__(self, tasks): | |
Thread.__init__(self) | |
self.tasks = tasks | |
self.daemon = True | |
self.start() |
This file contains 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
db.countries.insert({acron: 'AF', name: 'Afeganistão'} ) | |
db.countries.insert({acron: 'AL', name: 'Albânia'} ) | |
db.countries.insert({acron: 'DZ', name: 'Argélia'} ) | |
db.countries.insert({acron: 'DS', name: 'Samoa'} ) | |
db.countries.insert({acron: 'AD', name: 'Andorra'} ) | |
db.countries.insert({acron: 'AO', name: 'Angola'} ) | |
db.countries.insert({acron: 'AI', name: 'Anguilla'} ) | |
db.countries.insert({acron: 'AQ', name: 'Antártica'} ) | |
db.countries.insert({acron: 'AG', name: 'Antigua e / ou Barbuda'} ) | |
db.countries.insert({acron: 'AR', name: 'Argentina'} ) |
This file contains 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
package main | |
import ( | |
"io" | |
"log" | |
"net/http" | |
) | |
type httpClient interface { | |
Get(string) (*http.Response, error) |
This file contains 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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
OlderNewer