Skip to content

Instantly share code, notes, and snippets.

View leandroh's full-sized avatar
:shipit:
To deploy or not to deploy?

Leandro Pará leandroh

:shipit:
To deploy or not to deploy?
View GitHub Profile
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@wevtimoteo
wevtimoteo / redis_rb_remove_keys_by_namespace.rb
Last active June 28, 2018 13:39
Removing keys by namespace with Redis-RB
%w(
months*
extract*
payment*
consolidate*
agenda*
brands
car_model*
car*
visit_types*
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active March 26, 2022 10:03
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@alexandre
alexandre / restful_python_ops.md
Last active June 6, 2022 19:08
Algumas opções em Python para criar APIs Restful
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def crc32(string):
crctab = []
for table in range(256):
crc = table << 24
@renzon
renzon / saque.py
Last active August 29, 2015 13:57
Código para geração de saques
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
QTD_INICIAL_DE_NOTAS = 10
NOTAS = [5, 10, 20, 50]
def sacar_recursiva(valor, saque, notas_disponiveis, qtdes_disponiveis):
# Se valor é 0, entao retorno é saque atual como resposta
@fabiocerqueira
fabiocerqueira / example_descriptors.py
Created October 11, 2012 02:17
Exemplo de uso de descriptors em Python
class Field(object):
def __init__(self, default=None):
self.val = default
def __get__(self, obj, objtype):
if obj is None:
return self.__class__
else:
return self.val
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@AliMD
AliMD / gist:3344523
Created August 13, 2012 22:28
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨