Skip to content

Instantly share code, notes, and snippets.

View sebastianconcept's full-sized avatar

Sebastian Sastre sebastianconcept

View GitHub Profile
@pomber
pomber / deploy-prod.sh
Created March 30, 2017 20:21
Full deploy script
#!/bin/bash
set -e
docker build -t gcr.io/${PROJECT_PROD}/${NGINX_IMAGE}:$TRAVIS_COMMIT -f docker/nginx.dockerfile .
docker build -t gcr.io/${PROJECT_PROD}/${NODE_IMAGE}:$TRAVIS_COMMIT -f docker/node.dockerfile .
echo $GCLOUD_SERVICE_KEY_TEST | base64 --decode -i > ${HOME}/gcloud-service-key.json
gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
@nikgraf
nikgraf / reactive-2016.md
Last active August 5, 2021 15:31
Proposal for lightning talk at Reactive Conf 2016

Rich text editing with DraftJS Plugins

Earlier this year Facebook open sourced its React based rich text editing framework Draft.js. At Facebook it powers status updates, comments & notes. Others used it to build editors matching Medium’s experience.

Together with a whole team of open source contributors I built a plugin architecture on top of Draft.js. In this talk I walk you through the existing plugins and show how you can build your own feature-rich text editor for the web with only a handful lines of code. 🤓

Draft JS Plugins Logo

@faceyspacey
faceyspacey / meteor-accounts-twitter-auth.js
Last active June 10, 2019 17:30
meteor-accounts-twitter-auth
const Twit = Meteor.npmRequire('twit');
Accounts.registerLoginHandler('twitter', function(params) {
const data = params.twitter;
// If this isn't twitter login then we don't care about it. No need to proceed.
if (!data) {
return undefined;
}
@wacko
wacko / gist:5577187
Last active July 13, 2024 00:48
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0

@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@jacaetevha
jacaetevha / gist:3795784
Created September 27, 2012 19:02
Smalltalk syntax on a postcard
exampleWithNumber: x
"A method that illustrates every part of Smalltalk method syntax
except primitives. It has unary, binary, and keyword messages,
declares arguments and temporaries, accesses a global variable
(but not and instance variable), uses literals (array, character,
symbol, string, integer, float), uses the pseudo variables
true false, nil, self, and super, and has sequence, assignment,
return and cascade. It has both zero argument and one argument blocks."
@dalehenrich
dalehenrich / assumptions.md
Created February 23, 2012 17:36
List of assumptions about using git for managing Smalltalk source
  1. I assume that by moving to a disk-based structure, we are expecting folks to edit and modify directory structure on disk using the shell and standard editors. This means that all information is going to be stored in plain test files. No binary files. Binary files may be stored in the project structure for use by developers, but the mechanisms for loading code into an image from disk must not involve binary files.

  2. I assume that we will preserve package structure on disk. This means that at a minimum we must be able to preserve the collection of class and method definitions that make up a Monticello package. This includes traits and any other standard definitions that are currently present in a Monticello package. In practice "preserving the package structure" means that one can load a package from disk and then save the package to disk in another location and the directory structure is "identical". The package loader must be respectful of files and directories that are not part of the official package

@dalehenrich
dalehenrich / MetacelloScripting.st
Created February 23, 2012 10:02
Sample of Metacello Scripting API
"download HEAD of master branch of the sample project, i.e., download from github, but don't load Sample project into image"
Metacello new
project: 'Sample';
repository: 'github://dalehenrich/sample:master/core';
get.
"load HEAD of master branch of the sample project, i.e., download from github, and load Sample project into image"
Metacello new
project: 'Sample';
repository: 'github://dalehenrich/sample:master/core';
@gabrielfalcao
gabrielfalcao / README.md
Created June 3, 2011 19:44
Homebrew formula for nginx with the tcp socket proxy module already enabled