Skip to content

Instantly share code, notes, and snippets.

miguelmota / Makefile
Last active June 11, 2024 00:17
Makefile docker push to AWS Elastic Container Registry (ECR)
# Login to AWS registry (must have docker running)
$$(aws ecr get-login --no-include-email --region us-east-1 --profile=mycompany)
# Build docker target
docker build -f Dockerfile --no-cache -t mycompany/myapp .
# Tag docker image
mpneuried / Makefile
Last active July 7, 2024 14:30
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
oscarmorrison /
Last active December 3, 2023 21:44
Make IFTTT Date Format play nice with Google Spreadsheets

##Date and Time

=TIMEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " ")) + DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))


=DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))


dandelany / gist:1ff06f4fa1f8d6f89c5e
Last active March 27, 2024 10:06
Recursively cloning React children
var RecursiveChildComponent = React.createClass({
render() {
return <div>
recursiveCloneChildren(children) {
return, child => {
if(!_.isObject(child)) return child;
var childProps = {someNew: "propToAdd"};
bzerangue /
Last active July 19, 2024 07:35
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

pbuyle / MODULE.install.php
Last active November 9, 2022 18:19
Drupal - Migrate existing field content from language "undefined" to entity language in a single hook_update_N() implementation.
* Migrate existing field content from language "undefined" to entity language.
function MODULE_update_N(&$sandbox) {
// Number of entities to be processed for each step.
$messages = array();
if (!isset($sandbox['fields'])) {
// Initialize the array of field to process.
kostajh /
Created February 28, 2012 21:06
Rebuild script for Drupal Install Profile
# This script facilitates obtaining the latest DB data from the production
# Drupal 5 site.
# The script gets an ordered dump of the D5 database, and commits it to the
# repository master branch.
# We make use of the rebuild.config file, so please make sure that your
# settings are correct there!
# We also assume that your drush aliases are setup correctly for
# and Please check mysite.aliases.drushrc.example,
# make sure your alias is set up correctly, rename the file
# to mysite.aliases.drushrc.php and move it into your ~/.drush directory.