Skip to content

Instantly share code, notes, and snippets.

Steve Gentile sgentile

Block or report user

Report or block sgentile

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .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 Feb 16, 2018
django-postgres-docker-docker-compose
View gist:126f8ebccd1e09299aab3618f2e2b732
version: "2.2"
services:
web:
build: .
ports:
- "8080:8080"
depends_on:
- "db"
db:
image: postgres:9.6-alpine
View gist:916825f320f45858d0f6436e6aa28720
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
View gist:c142c08b043f9039037d9d37133df445
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.
View gist:57278056ae88ceff0e6ffb16be640df7
#~/.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 Aug 29, 2015
Example of how I used Grunt with Durandal
View Gruntfile.js
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 Dec 20, 2015
Simple ruby map and reduce example
View ruby_map_reduce
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 Dec 20, 2015
simple python map and reduce
View python_map_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 Jul 31, 2012
Calling a Module with Coffeescript
View coffeescriptNodeModule
#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 Feb 9, 2012
Coffeescript static property and method
View gist:1777385
class Person
@test: (input) ->
return input
@staticProperty : 10
@get: ->
return {name:'Steve'}
nonStatic: ->
return "non static"
console.log Person.test 'Hello World'
You can’t perform that action at this time.