Skip to content

Instantly share code, notes, and snippets.

@dohomi
dohomi / app.vue
Last active August 21, 2021 19:55
Small file input element based on vuetify
<template>
<file-input v-model="filename" @formData="formData">
<v-btn @click.native="uploadFiles">
</template>
<script>
import fileInput from './file-input.vue'
export default{
components:{fileInput}
@coco-napky
coco-napky / hyper.js
Created March 8, 2017 23:21
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@drewjoh
drewjoh / Cors.php
Created June 13, 2016 22:47
Laravel CORS Middleware
<?php // /app/Http/Middleware/Cors.php
namespace App\Http\Middleware;
use Closure;
class Cors {
public function handle($request, Closure $next)
{
return $next($request)
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@shime
shime / _readme.md
Last active April 28, 2023 18:56
github oauth in node using express

What?

Most basic example of authenticating with Github in node.

How?

Clone this gist, change keys inside config.js and then hit npm install && node app.js.

Done?

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active April 16, 2024 16:36
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@keeb-zz
keeb-zz / README.md
Created July 23, 2013 19:35
The power of Docker+Hipache - Immediate Test Environments, even with Static Port Forwarding

I do most of my development on a remote server or on a local virtual instance. It just makes more sense, being able to work in a portable environment and pick up where I leave off lets me worry less about environment and more about the problem at hand.

One of the problems with using a technology like VirtualBox in combination with Docker is that Docker containers are truly portable and should expose a random port chosen by the host while VirtualBox port forwarding is static. You could, for every container, create a new port forwarding rule in your VirtualBox configuration, but that requires you change host configuration to be able to run your application. Not ideal and certainly not portable.

Enter hipache. Hipache is the best way to configure reverse proxies. In this example, hipache is the entrypoint for all web traffic on the host. Running hipache in a container just like any other service allows for ultimate flexibility.

Vagrantfile

Vagrant is a cool way of abstracting VM semantics and spin

@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API
@chrisyip
chrisyip / vagrant-lamp.sh
Created May 8, 2013 11:58
Vagrant shell script for LAMP.
#!/usr/bin/env bash
apt-get update
echo mysql-server-5.5 mysql-server/root_password password PASSWORD | debconf-set-selections
echo mysql-server-5.5 mysql-server/root_password_again password PASSWORD | debconf-set-selections
apt-get install -y mysql-common mysql-server mysql-client
apt-get install -y apache2