Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# USAGE: ./copy-docker.sh nginx:stable-alpine /etc/nginx/nginx.conf nginx.conf
image=$1
src=$2
dest=$3
container_name="copy-docker-temp"
docker create -it --name ${container_name} ${image} bash
@joao-fontenele
joao-fontenele / javascript.js
Last active March 18, 2020 17:23
vs code snippets for js
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@vidhill
vidhill / Dockerfile
Created July 26, 2017 22:36
node-gyp within Docker
FROM node:6.9.1-alpine
MAINTAINER vidhill
RUN apk add --no-cache add python build-base # build base includes g++ and gcc and Make
COPY service.tgz /service/
RUN cd /service && tar xvf service.tgz && rm service.tgz && cd package
RUN cd /service/package && npm install
@libitte
libitte / gist:cbde168d26bc5faf9bf9fef648091b42
Last active November 11, 2022 19:30
FIX warning: ignoring broken ref refs/remotes/origin/HEAD

warning: ignoring broken ref refs/remotes/origin/HEAD


➜   ✗ g symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/develop
➜   ✗ g fetch --prune
➜   ✗ g gc

@bisubus
bisubus / ES5-ES6-ES2017-ES2019 omit & pick
Last active April 13, 2024 21:03
ES5/ES6/ES2017/ES2019 omit & pick
@wesbos
wesbos / commit-msg
Created July 4, 2016 18:55
ESLint 3.0 Git Pre Commit Hook
#!/bin/bash
files=$(git diff --cached --name-only | grep '\.jsx\?$')
# Prevent ESLint help message if no files matched
if [[ $files = "" ]] ; then
exit 0
fi
failed=0
for file in ${files}; do
@andrewslince
andrewslince / how to configure ssl on development server
Last active July 28, 2017 14:41
Script to configurate a fake ssl virtual host, using Apache Server, on Linux.
#!/bin/bash
##################################################################################################
## ##
## Credits: ##
## - http://www.phpit.com.br/artigos/configurando-ssl-servidor-de-desenvolvimento-apache.phpit ##
## - http://wime.com.br/2013/06/28/como-criar-certificado-ssl-no-apache-para-ubuntu-12-04/ ##
## ##
##################################################################################################
@tafkey
tafkey / git_overview
Last active October 19, 2023 15:15
Print git status of all repositories under the current folder
find . -type d -name '.git' | while read dir ; do sh -c "cd $dir/../ && echo -e \"\nGIT STATUS IN ${dir//\.git/}\" && git status -s" ; done
@revolunet
revolunet / python-es6-comparison.md
Last active April 22, 2024 19:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 12, 2024 11:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest