Skip to content

Instantly share code, notes, and snippets.

View OutThisLife's full-sized avatar
🏠
Working from home

brooklyn! OutThisLife

🏠
Working from home
View GitHub Profile
@OutThisLife
OutThisLife / classes.sass
Last active October 12, 2015 11:37
classes.sass
@charset "UTF-8"
//
$medium: 64em
$small: 40.063em
// -----------------------------------------------
@function rem($size)
$remSize: $size / 16
@OutThisLife
OutThisLife / finviz_print.php
Last active December 21, 2015 10:09
print out all charts from a finviz chart screen page.
<?php
/*
* Prints out all finviz charts from a specific screen.
*/
// -----------------------------------------------
libxml_use_internal_errors(1);
DEFINE('F_BASE', 'http://finviz.com/screener.ashx?v=212&f=cap_midover,fa_eps5years_o15,sh_avgvol_o750,ta_perf_52w20o&ft=4&ta=0&o=-volume&r=');
@OutThisLife
OutThisLife / nws_email.html
Last active December 25, 2015 06:58
HTML Email Boilerplate (Refactored)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>REPLACE_ME</title>
<style>
/* HTML Email Reset */
gulp = require 'gulp'
gutil = require 'gulp-util'
watch = require 'gulp-watch'
sass = require 'gulp-sass'
coffee = require 'gulp-coffee'
imagemin = require 'gulp-imagemin'
minify = require 'gulp-minify-css'
uglify = require 'gulp-uglify'
source = require 'vinyl-source-stream'
buffer = require 'vinyl-buffer'
ftp = require 'vinyl-ftp'
rs = require 'run-sequence'
gulp = require 'gulp'
gulpif = require 'gulp-if'
sass = require 'gulp-sass'
gutil = require 'gulp-util'
notify = require 'gulp-notify'
@OutThisLife
OutThisLife / AnimateOut.js
Created December 22, 2016 22:49
Fix for iOS back/forward button when using CSS animations to load in and out the content.
const $container = document.getElementById('container')
window.onpageshow = (e) => e.persisted ? window.location.reload() : null
export default function(href) {
document.body.classList.remove('load-in')
document.body.classList.add('load-out')
;['animationend', 'webkitAnimationEnd'].map(evt => {
$container.addEventListener(evt, (e) => {
{
"user": {
"debug": false,
"delay": 0,
"error_color": "D02000",
"gutter_theme": "Packages/Boxy Theme/extras/SublimeLinter/Boxy.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"eslint": {
import express from 'express'
const
port = process.env.PORT || 3000,
app = express()
// -----------------------------------------------
app.listen(port, () => console.log('Listening on port', port))
@OutThisLife
OutThisLife / server-react.js
Last active July 20, 2017 16:20
SSR react
import React from 'react'
import { renderToString } from 'react-dom/server'
import express from 'express'
import Homepage from './src/pages/home'
const
port = process.env.PORT || 3000,
app = express()
// -----------------------------------------------
<?php
add_action('rest_api_init', function() {
register_rest_field(get_post_types(), 'fields', [
'get_callback' => function($post) {
return CFS()->get();
},
]);
});