Skip to content

Instantly share code, notes, and snippets.

@epatr
epatr / popup.js
Created October 27, 2015 16:32
Bookmarklet to pop up websites in window without browser toolbars
javascript:window.open('http://','windowName','width=960,height=720,scrollbars=yes,status=no,titlebar=no,toolbar=no');void(0);
@epatr
epatr / chrome.lnk
Created October 27, 2015 16:35
Target parameters to get Chrome to open an "app" window in Windows
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" --app=http://
@epatr
epatr / Rakefile
Created May 27, 2016 16:58
Cloud9 Rakefile to run Jekyll
task :watch do
system('jekyll serve --host $IP --port $PORT --baseurl ''')
end
import os
import urllib2
print("Opening urls.txt...")
for url in open('urls.txt'):
filename = url.split('/')[-1].rstrip()
if not os.path.exists(filename):
print("Downloading"),
print filename
00 01 10 11
00000 NUL Spc @ `
00001 SOH ! A a
00010 STX " B b
00011 ETX # C c
00100 EOT $ D d
00101 ENQ % E e
00110 ACK & F f
00111 BEL ' G g
01000 BS ( H h
@epatr
epatr / _reboot-variables.scss
Created June 14, 2017 22:51
A Sass file to @import before importing Bootstrap 4's Reboot file. Uses Bootstrap defaults.
// Required mixin
$enable-hover-media-query: false;
@mixin hover-focus {
@if $enable-hover-media-query {
&:focus { @content }
@include hover { @content }
}
@else {
&:focus,
&:hover {
<?php
/*
Plugin Name: Custom Post Type - Events
Version: 0.0.1
Plugin URI: http://ukyrgf.com
Description: Defines a custom post type for an event calendar
Author URI: https://epatr.com
Author: Eric Patrick
*/
.devhub-wrap #content-area.has-sidebar {
width: auto;
}
.devhub-wrap #content-area, .devhub-wrap .inner-wrap {
max-width: none;
}
.devhub-wrap .has-sidebar main {
width: 79%;
import { NgModule, Component } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
@Component({
selector: 'racing-app',
template: '<h1>{{heading}}</h1>'
})
class AppComponent {
heading = "Ultra Racing Schedule"
<?php
function fizzbuzz ($first, $last) {
$current = $first;
while ($current <= $last) {
if (($current % 3 == 0) && ($current % 5 == 0)) {
yield "fizzbuzz";
} else if ($current % 3 == 0) {
yield "fizz";
} else if ($current % 5 == 0) {