Skip to content

Instantly share code, notes, and snippets.

View 9oelM's full-sized avatar
🎯
Focusing

Joel Mun 9oelM

🎯
Focusing
View GitHub Profile
@mikaelbr
mikaelbr / gulpfile.js
Created January 14, 2014 20:24
Example gulpfile for complete set-up.
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var less = require('gulp-less');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var minifyCSS = require('gulp-minify-css');
var embedlr = require('gulp-embedlr');
@demisx
demisx / gulpfile.js
Last active November 6, 2019 23:10
My Gulp file example
var gulp = require('gulp'),
debug = require('gulp-debug'),
size = require('gulp-filesize'),
clean = require('gulp-clean'),
coffee = require('gulp-coffee'),
coffeelint = require('gulp-coffeelint'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
imagemin = require('gulp-imagemin'),
changed = require('gulp-changed'),
@gradosevic
gradosevic / gulpfile_react.js
Last active November 24, 2022 06:27
Working gulpfile.js with gulp-babel ES6 and React
var gulp = require('gulp');
var babel = require("gulp-babel");
var sourcemaps = require('gulp-sourcemaps');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
gulp.task('default', () => {
return gulp.src('js/main.js')
.pipe(sourcemaps.init())
.pipe(babel({
@torgeir
torgeir / gulpfile.js
Last active June 12, 2023 09:52 — forked from markgoodyear/01-gulpfile.js
Example gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
@asanoboy
asanoboy / makewav.js
Created October 30, 2012 11:39
How to make a WAV file in Javascript.
var Wav = function(opt_params){
/**
* @private
*/
this._sampleRate = opt_params && opt_params.sampleRate ? opt_params.sampleRate : 44100;
/**
* @private
*/
@ryansimms
ryansimms / circleci-2.0-eb-deployment.md
Last active February 22, 2024 04:55
Deploying to Elastic Beanstalk via CircleCi 2.0

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@brennanMKE
brennanMKE / hero.ts
Last active April 1, 2024 16:16
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@richjenks
richjenks / countries.md
Last active April 5, 2024 15:19
ISO 3166 countries by region — AMER, EMEA & APAC
Country ISO 3166 Region
Afghanistan AF EMEA
Åland Islands AX EMEA
Albania AL EMEA
Algeria DZ EMEA
American Samoa AS APAC
Andorra AD EMEA
Angola AO EMEA
Anguilla AI AMER