Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph Karasek joekarasek

View GitHub Profile
@joekarasek
joekarasek / index.html
Created Mar 16, 2018
Emmet examples (html)
View index.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 Feb 11, 2017
Files Needed for Silex Heroku Deployment
View Profile
web: vendor/bin/heroku-php-apache2 web/
@joekarasek
joekarasek / trails.js
Last active Apr 12, 2016
multiple api with forEach
View trails.js
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 Aug 25, 2016
Github pages deploy setup for ember
View deploy-to-github-pages.sh
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
View gulpfile.js
// 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 Feb 11, 2016
commands to set up a new php/silex project
View gist:98d830efc3a1e937bc0c
#!/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
View emmet-examples.html
<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>
View html-starter.html
<!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 -->
You can’t perform that action at this time.