Skip to content

Instantly share code, notes, and snippets.

View joekarasek's full-sized avatar

Joseph Karasek joekarasek

View GitHub Profile
@joekarasek
joekarasek / index.html
Created March 16, 2018 01:43
Emmet examples (html)
<!-- div.row -->
<div class="row"></div>
<!-- div.row.myFirstRow -->
<div class="row myFirstRow"></div>
<!-- div#myId -->
<div id="myId"></div>
<!-- div#myId.row.anotherClass -->
@joekarasek
joekarasek / Profile
Created February 11, 2017 23:50
Files Needed for Silex Heroku Deployment
web: vendor/bin/heroku-php-apache2 web/
@joekarasek
joekarasek / trails.js
Last active April 12, 2016 23:20
multiple api with forEach
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return $.ajax({
url: "https://trailapi-trailapi.p.mashape.com/?limit=25&q[activities_activity_type_name_eq]=hiking&q[city_cont]=Portland&q[state_cont]=Oregon&radius=100",
dataType: 'json',
headers: {
"X-Mashape-Key": "B5k9wMYIN1mshGQskDNQxcHnPhJmp1LoDvsjsn8IuL3NSxR6ic",
"Accept": "application/json"
@joekarasek
joekarasek / deploy-to-github-pages.sh
Last active August 25, 2016 16:37
Github pages deploy setup for ember
echo "Switch to gh-pages branch"
git checkout gh-pages
git merge master
echo "Clean up"
rm -rf dist
echo "Create new production build"
ember build --environment production
// Include gulp
var gulp = require('gulp');
// Plugins for gulp
var browserify = require('browserify');
var concat = require('gulp-concat');
var del = require('del');
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var source = require('vinyl-source-stream');
@joekarasek
joekarasek / gist:98d830efc3a1e937bc0c
Created February 11, 2016 21:20
commands to set up a new php/silex project
#!/bin/sh
echo "project name:"
read PROJECT_NAME
echo "port to use:"
read PORT
mkdir ~/${PROJECT_NAME}
cd ~/${PROJECT_NAME}
mkdir app web src views
echo vendor/ > .gitignore
echo "<?php \n\t\$website = require_once __DIR__.'/../app/app.php'; \n\t\$website->run(); ?>" > web/index.php
<h1>Using <a href="http://emmet.io">Emmet</a></h1>
<!-- .template>h1.title+.body>p*3 -->
<div class="template">
<h1 class="title"></h1>
<div class="body">
<p></p>
<p></p>
<p></p>
</div>
<!doctype html>
<html class="no-js" lang="en">
<head>
<title></title>
<meta name="description" content="">
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Bootstrap: Latest compiled and minified CSS -->