Skip to content

Instantly share code, notes, and snippets.

Jesse Shawl jshawl

Block or report user

Report or block jshawl

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
@jshawl
jshawl / Gruntfile.js
Last active Jun 12, 2019
Grunt + Sass + Autoprefixer
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
View solution-oop.py
class FizzBuzz:
def __init__(self,num):
self.count(num)
def count(self,num):
if num >= 1:
self.count(num - 1)
self.fizz_buzz(num)
def fizz_buzz(self,num):
@jshawl
jshawl / docker-compose.yml
Last active Dec 2, 2018
Simplest possible Wordpress + MySql + phpMyAdmin docker-compose.yml
View docker-compose.yml
version: '3.3'
services:
db:
container_name: db
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
@jshawl
jshawl / app.rb
Last active Apr 12, 2018
Combine Two CSVs side-by-side
View app.rb
require 'csv'
# note: << in ruby is the same as .push
# [1,2] << 15 #=> [1,2,15]
new_csv = []
CSV.foreach('csv1.csv') do |csv1|
new_csv << csv1
end
View common-vim.md

Vim Alphabet

a

a enter into insert mode after the character your cursor is on

A enter into insert mode at the end of the current line

b

View keybase.md

Keybase proof

I hereby claim:

  • I am jshawl on github.
  • I am jshawl (https://keybase.io/jshawl) on keybase.
  • I have a public key whose fingerprint is A7D6 9D8E 4890 780A 6598 7BF0 0060 9B50 41C8 7746

To claim this, I am signing this object:

View index.html
<style media="screen">
.container div{
width:25%;
height:100px;
float:left;
transition: all .2s ease;
}
</style>
<div class='container'>
<div style='background:red;'></div>
View rails-commands.md

Common Rails Commands

rake db:create

  • Creates all the databases specified in config/database.yml

rake db:migrate

  • Run existing migrations in db/migrate
  • Generates the schema.rb file
View OnTheMoney.java
import java.util.Scanner;
public class OnTheMoney {
public static void main(String[] args) {
String n;
String lastName;
int denom;
//"denom" will be the variable used for either the $1, $10, or $100
Scanner sc = new Scanner (System.in);
View app.rb
while true
while true
puts "press enter"
input = gets.chomp
break if input != ""
end
puts "you lose"
puts "do you want to play again?"
input = gets.chomp
if input == "no"
You can’t perform that action at this time.