Skip to content

Instantly share code, notes, and snippets.

@seyhunak
seyhunak / Cheffile
Created November 27, 2014 21:02
Vagrant & Chef Configuration (Ruby 2.1.5 - Rails 4 - Nginx - MySQL - Redis - rbenv - Vim - Tmux)
# encoding: utf-8
site 'http://community.opscode.com/api/v1'
cookbook "apt"
cookbook "nginx", {}
cookbook "vim", {}
cookbook "redis", {:github=>"ctrabold/chef-redis"}
cookbook "ruby_build", {:github=>"fnichol/chef-ruby_build", :ref=>"v0.7.2"}
cookbook "rbenv", {:github=>"fnichol/chef-rbenv"}
// with static data, do filtering and sorting in the client
<Autocomplete
initialValue="Ma"
items={getUnitedStates()}
getItemValue={(item) => item.name}
shouldItemRender={(item, value) => (
state.name.toLowerCase().indexOf(value.toLowerCase()) !== -1 ||
state.abbr.toLowerCase().indexOf(value.toLowerCase()) !== -1
)}
sortItems={(a, b, value) => (
daemon off;
worker_processes 6;
user nobody nobody;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
@connor
connor / newSite.sh
Created September 15, 2011 05:53
newSite command to make a new site from the terminal
## please note: this assumes you have a folder called _StartingSiteTemplate in ~/Documents.
## i have uploaded a zip of my _StartingSiteTemplate here: http://cl.ly/1u2W1K2Q192Z3C0r2J0x
## that file above is based off of paul irish's html5 boilerplate - highly recommended!
## NOTE: this is using textmate and LESScss, but those are easily configurable.
## NOTE: if rsync isn't working for you, note the file paths I'm using.
newSite(){
echo "Please name the directory: "
read SITE_NAME
echo "Creating $SITE_NAME... zomg!"
@thomas-jeepe
thomas-jeepe / FormGenerator.js
Last active October 12, 2015 18:46
FormGenerator, not for use so copy off of it
import React from 'react'
import { TextField, RaisedButton, FlatButton, Paper, Toggle, RadioButton, RadioButtonGroup, DropDownMenu } from 'material-ui'
//This is a HOC which adds required material-ui themes to the component
//You should be able to not use material-ui at all or add childContextTypes with the theme
import MuiComponent from '../containers/MuiComponent'
/*
You dont have to use these components so I recommened you change styles to you liking.
*/
let FormValues;
@necolas
necolas / Button.jsx
Last active November 4, 2015 00:05
CSS-in-JS to CSS
import React from 'react';
import styles from './styles.css.js';
class Button extends React.Component{
render() {
return (
<button className={styles.button}>
<span className={styles.icon} />
Button
</button>
@anselmo
anselmo / gist:5930858
Last active December 19, 2015 09:09
.vimrc - quick vim config
filetype on
filetype off
filetype plugin indent on
set nocompatible
set encoding=utf-8
set modelines=0
set scrolloff=3
set autoindent
set showmode
set showcmd
@events =
events: {}
on: (topic, handler, context = this) ->
(@events[topic] or= []).push {handler, context}
trigger: (topic, args...) ->
return unless @events[topic]?
handler.apply(context, args) for {handler, context} in @events[topic]
@judofyr
judofyr / fizzbuzz.rb
Created August 1, 2012 21:37 — forked from JEG2/fizzbuzz.rb
Writing FizzBuzz with flip-flops
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
?\n
end
@gblmarquez
gblmarquez / bootstrap.sh
Last active July 13, 2016 20:43
mac bootstrap
brew cask install google-chrome
brew cask install firefox
brew cask install skype
brew cask install spotify
brew cask install iterm2
brew cask install atom
brew cask install virtualbox --appdir=/Applications
brew install azukiapp/azk/azk