Skip to content

Instantly share code, notes, and snippets.

View cmilfont's full-sized avatar

Christiano Milfont cmilfont

View GitHub Profile
@faermanj
faermanj / note.sh
Created September 1, 2021 13:54
Delete a versioned bucket
aws s3api put-bucket-versioning --bucket "{{bucket}}" --versioning-configuration "Status=Suspended";
aws s3api delete-objects --bucket "{{bucket}}" --delete "$(aws s3api list-object-versions --bucket "{{bucket}}" --output=json --query='{Objects: *[].{Key:Key,VersionId:VersionId}}')";
aws s3api delete-bucket-policy --bucket "{{bucket}}";
aws s3 rm "s3://{{bucket}}" --recursive;
aws s3 rb "s3://{{bucket}}"

Uma rapsódia deste ano que–para ou bem ou para o mal–está prestes a se acabar

tl;dr: Foi um dos anos que eu mais me fudi, mas também um dos que eu mais aprendi–e, por isso, eu o considero especialmente bom na minha vida.

Foto dos pés, sempre!

  • Comecei a trabalhar "sério" em um canto–e esse choque já me era necessário para sair de uma zona de conforto que estava prestes a me levar a uma grave estagnação.

Cheat sheet for callable entities in ES6

Value:

FD FE AF C M
Function-callable ×
Constructor-callable × ×
Prototype F.p F.p F.p SC F.p
Property prototype × ×
import Keys._
name := "hello"
version := "1.0"
scalaVersion := "2.10.2"
lazy val hello = taskKey[Unit]("A custom run task.")
Princípios para trabalhar com ExtJS 4
  1. Programe orientado a Widgets, nunca pense em HTML.
  2. Defina seus próprios componentes, nunca use diretamente do próprio Framework.
  3. Nunca faça Ajax, estruture seus modelos de negócios e use a API de dados.
  4. Abuse de Mixins e Tiny Components para deixar seu código o mais claro possível.
  5. Um Widget não conhece outras hierarquias, use callbacks e listeners para comunicação.
  6. Defina o escopo this para as chamadas de cada função que for criada.
  7. Conheça e abuse FP.
rails: rails s
pg: postgres -D vendor/postgres
es: vendor/elasticsearch/bin/elasticsearch -f
redis: vendor/redis/src/redis-server vendor/redis/redis.conf
@brunoborges
brunoborges / gist:2908606
Created June 11, 2012 05:12
No #TDC2012 vc talvez aprenda a usar Scala, Apache Camel e o Twitter :-)
class MyRouteBuilder extends RouteBuilder {
val tweetMsg = (e: Exchange) ⇒ {
val tweet = new StatusUpdate("@%s ei, se minha palestra for aceita, voce vai aprender como usar Scala, Apache Camel e Twitter!".format(status.getFromUser()))
tweet.setInReplyToStatusId(e.getIn.getBody.asInstanceOf[Tweet].getId())
e.getIn().setBody(tweet)
}
"twitter://search?delay=10&type=polling&keywords=%23TDC2012%20scala%20camel%20twitter" ==> {
when(_.in.asInstanceOf[Tweet].getFromUser() != "brunoborges") {
@ktkaushik
ktkaushik / status_header_setter
Created April 17, 2012 11:32
Set HTTP status headers with respond_with( object ) in rails.
1xx Informational
100 Continue :continue
101 Switching Protocols :switching_protocols
102 Processing :processing
2xx Success
200 OK :ok
@dcsobral
dcsobral / WordCount.scala
Created November 25, 2011 13:00
WordCount
// Based on Fantom's word count example here: http://blog.joda.org/2011/11/guide-to-evaluating-fantom.html
// I'm commenting the lines that need changing, and leaving a few of them uncommented,
// as they are the same
// class WordCount {
object WordCount {
// Void main(Str[] args) {
def main(args: Array[String]) {
if (args.size != 1) {