Skip to content

Instantly share code, notes, and snippets.

View sgentile's full-sized avatar

Steve Gentile sgentile

  • Mile Two
  • Dayton, Ohio
View GitHub Profile
@sgentile
sgentile / .profile
Created March 12, 2018 14:40
My Profile
#~/.profile is the place to put stuff that applies to your whole session, such as programs that you want to start when you log in (but not graphical programs,
#they go into a different file), and environment variable definitions.
# syntax to just add multiple entries at the same time. If you want to add one line at a time it's more like export PATH="/usr/local/bin:$PATH"
# path does not need to be exported, but things like ANDROID_HOME do
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
# export GOPATH=$HOME/golang
@sgentile
sgentile / gist:126f8ebccd1e09299aab3618f2e2b732
Created February 16, 2018 22:13
django-postgres-docker-docker-compose
version: "2.2"
services:
web:
build: .
ports:
- "8080:8080"
depends_on:
- "db"
db:
image: postgres:9.6-alpine
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const merge = require('webpack-merge');
const webpackconfig = require('./webpack.config.js');
module.exports = (config) => {
config.set({
browsers: ['PhantomJS', 'Chrome'], //run in Chrome
const webpack = require('webpack');
const path = require('path');
// Webpack extensions
const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const validate = require('webpack-validator');
// For production builds, additional steps are necessary.
#~/.profile is the place to put stuff that applies to your whole session, such as programs that you want to start when you log in (but not graphical programs,
#they go into a different file), and environment variable definitions.
# syntax to just add multiple entries at the same time. If you want to add one line at a time it's more like export PATH="/usr/local/bin:$PATH"
# path does not need to be exported, but things like ANDROID_HOME do
export GOPATH=$HOME/golang
export STASH_CREDS=sgentile
export ANDROID_HOME=/Users/sgentile/Library/Android/sdk
@sgentile
sgentile / Gruntfile.js
Last active August 29, 2015 14:00
Example of how I used Grunt with Durandal
module.exports = function (grunt) {
grunt.initConfig({
clean: ['css/style.min.css', 'app/main-built.js'],
concat: {
css: {
src: ['css/style.css'],
dest: 'css/temp.css'
}
},
cssmin: {
@sgentile
sgentile / ruby_map_reduce
Last active December 20, 2015 05:39
Simple ruby map and reduce example
people = [{name:'Steve', age:43},{name:'Tyler', age:8}]
puts people.reduce(0) {|sum, value| sum + value[:age] } # 51
puts people.map {|n| n[:age]} # 43, 8
learn more! http://ruby-doc.org/core-2.0/Enumerable.html
@sgentile
sgentile / python_map_reduce
Last active December 20, 2015 05:29
simple python map and reduce
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
people = []
people.append(Person("Steve", 43))
people.append(Person("Tyler", 8))
print map(lambda x: x.age, people) # [43,8]
@sgentile
sgentile / coffeescriptNodeModule
Created July 31, 2012 01:48
Calling a Module with Coffeescript
#helloWorld.coffee file
# Node Module
run = ->
console.log 'This is example node module'
exports.run = run
# Calling from another file, ie. app.coffee
@sgentile
sgentile / gist:1777385
Created February 9, 2012 04:47
Coffeescript static property and method
class Person
@test: (input) ->
return input
@staticProperty : 10
@get: ->
return {name:'Steve'}
nonStatic: ->
return "non static"
console.log Person.test 'Hello World'