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}}"
@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

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 × ×
@vshkurin
vshkurin / gist:1109136
Created July 27, 2011 10:50
ElasticSearch Test Queries
# Index
---------------------------------------------------------------------
curl -XPUT http://localhost:9200/pictures/ -d '
{
"settings": {
"analysis": {
"analyzer": {
"index_analyzer": {
"tokenizer": "standard",

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.
@leandrosilva
leandrosilva / README
Created August 29, 2010 04:05
Erlectricity sample (Erlang <-> Ruby)
This sample is strongly based on Erlectricity, avaliable from:
http://github.com/mojombo/erlectricity
The echo.rb is the same, but the echo.erl is really a little bit better. It's because I refactored it to
extract functions to send and receive messages and also (and more important) introduce some patterns on
receive statement to matching other messages (specially to receive exit_status messages from "dead" ports).
More sugar is always good. At least for me. ;)
@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) {
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.