Skip to content

Instantly share code, notes, and snippets.

Open iOS Sim

Add Alias

nano .bash_profile

type i at the top of the file

open iOS Simulator alias ios='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'

module.exports = function(context,cb) {
var axios = require('axios');
axios.get('https://api.breaker.audio/shows/185226/episodes/29314799', {
headers: {
'User-Agent': 'Breaker/1.0.0 (0)'
}
})
.then(function (response) {
console.log(response.data);
cb(null, response.data);
$breakpoints: {
sm: 37.5em, // 600px
md: 64em, // 1024px
lg: 80 em // 1280px
}
@mixin breakpoint($breakpoint) {
@media only screen (min-width: map-get($map: $breakpoints, $key: $breakpoint)) { @content: )
}
$data = array(
'firstname' => $_POST['form_logger_First_Name'],
'lastname' => $_POST['form_logger_Last_Name'],
'phone1' => $_POST['form_logger_Phone'],
'email1' => $_POST['form_logger_Email_Address'],
'streetaddress' => $_POST['form_logger_Street'],
'city' => $_POST['form_logger_City'],
'state' => $_POST['form_logger_State'],
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
var gulp = require('gulp'),
connect = require('gulp-connect');
var fileTowatch = ["*.html","application/**"] ;
gulp.task('connect', function() {
connect.server({
livereload: true,
port : 8888
});
@johnsiwicki
johnsiwicki / https to http
Created April 13, 2016 12:46
https to http
<?php
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) and $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'http') {
$url = "https://". $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: $url");
die();
}
?>
@johnsiwicki
johnsiwicki / background-swap.js
Last active December 31, 2015 18:37
swap background images on a timeer
var i =0;
var images = ['http://d6449bb3dc657045bfc9-290115cc0d6de62a29c33db202ae565c.r80.cf1.rackcdn.com/1214/mm-luxury-bg-img2-1600x544.jpg',
'http://placehold.it/350x150','http://placehold.it/350x150'];
var image = $('.main-message-wrap');
//Initial Background image setup
image.css('background-image', 'url(image1.png)');
//Change image at regular intervals
setInterval(function(){
image.css('background-image', 'url(' + images [i++] +')');
@johnsiwicki
johnsiwicki / month_day
Created April 23, 2015 20:31
php show on certain days/months ever year
<?php if ( time() >= strtotime(date('Y').'-07-11 00:01') && time() < strtotime(date('Y').'-08-31 23:59') )
{
?>
@johnsiwicki
johnsiwicki / trygit
Created October 14, 2014 18:04
Git Learning Tools
https://guides.github.com/
https://www.atlassian.com/git/tutorials/