Skip to content

Instantly share code, notes, and snippets.

View nicolaslopezj's full-sized avatar
🎯
Focusing

Nicolás López Jullian nicolaslopezj

🎯
Focusing
View GitHub Profile
@chimmelb
chimmelb / chromiumpackages.config
Last active June 7, 2024 14:55
.ebextensions config file to load NodeJS EB instance with packages needed for Puppeteer/Chromium
# This is for ElasticBeanstalk with Amazon Linux 2023. For previous Linux 2 or Linux 1, see revisions for ideas
packages:
yum:
cups-libs: []
libdrm: []
libXdamage: []
libXfixes: []
libXrandr: []
mesa-libgbm: []
libxkbcommon: []
@Rigellute
Rigellute / SQL highlighting in Javascript.md
Last active December 14, 2018 01:43
Add syntax highlighting for SQL queries composed in .js files in Atom.

Open preferences in atom and find/install language-babel.

Open the settings of language-babel.

Add /* sql */:source.sql to the Javascript tagged template literal grammer extensions.

Now write your queries like this /* sql */`SELECT * FROM users`. Make sure the query is in backticks `.

Enjoy the pretty queries!

@justindra
justindra / app-name.config
Last active November 16, 2018 17:19
Deploy Meteor to AWS Elastic Beanstalk
option_settings:
- option_name: ROOT_URL
value: http://app-name.elasticbeanstalk.com
- option_name: MONGO_URL
value: mongodb://user:pass@some-mongo.com:3001/app-name
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: ProxyServer
@joadr
joadr / Backup and restore Mongo database using gridFs.sh
Last active October 6, 2016 01:57
Mongo backup and restore database with gridFS
# Conectarse al servidor remoto
$ ssh root@armatubicicleta.cl
# Hago el dump en el sistema remoto
$ mongodump
# Comprimo el archivo en el sistema remoto
$ tar -zcvf armatubicicleta.tgz dump/armatubicicleta/
# Me descargo el archivo a mi sistema local (desde la terminal local)
$ scp root@armatubicicleta.cl:/root/dump/armatubicicleta.tgz /home/joaco/armatubicicleta.tgz
# Descomprimo el archivo
$ tar -zxvf armatubicicleta.tgz
@szehnder
szehnder / DataProvider.swift
Last active December 23, 2019 12:13
Pattern for async callback between a view controller and a dataprovider singleton
typealias ServiceResponse = (NSDictionary?, NSError?) -> Void
class DataProvider: NSObject {
var client:AFHTTPRequestOperationManager?
let LOGIN_URL = "/api/v1/login"
class var sharedInstance:DataProvider {
struct Singleton {
static let instance = DataProvider()
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"