Skip to content

Instantly share code, notes, and snippets.

View kevinn's full-sized avatar

Kevin Navia kevinn

View GitHub Profile
@kevinn
kevinn / DEMO: Floating menu nav
Last active August 29, 2015 14:03
DEMO: A simple floating menu nav when scrolling long pages (click on lower right hand corner caret/menu)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Scollmenu Demo</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css">
<style type="text/css" media="screen">
* {
-webkit-box-sizing: border-box;
@kevinn
kevinn / styles.less
Last active August 29, 2015 14:07
Atom Editor Personal Stylesheet - Tab bar style
/* ******************************************************
Kevin Navia
kevin@pixelpush.org
Github: kevinn
Atom Editor Stylesheet
Description: Basically removes the skewed tab bar style
that Atom Editor (htp://atom.io) has to standard tabs ui.
****************************************************** */
<?php
$country_list = array("AF" => "Afghanistan", "AL" => "Albania", "DZ" => "Algeria", "AS" => "American Samoa", "AD" => "Andorra", "AO" => "Angola", "AI" => "Anguilla", "AQ" => "Antarctica", "AG" => "Antigua and Barbuda", "AR" => "Argentina", "AM" => "Armenia", "AW" => "Aruba", "AU" => "Australia", "AT" => "Austria", "AZ" => "Azerbaijan", "BS" => "Bahamas", "BH" => "Bahrain", "BD" => "Bangladesh", "BB" => "Barbados", "BY" => "Belarus", "BE" => "Belgium", "BZ" => "Belize", "BJ" => "Benin", "BM" => "Bermuda", "BT" => "Bhutan", "BO" => "Bolivia", "BA" => "Bosnia and Herzegovina", "BW" => "Botswana", "BV" => "Bouvet Island", "BR" => "Brazil", "BQ" => "British Antarctic Territory", "IO" => "British Indian Ocean Territory", "VG" => "British Virgin Islands", "BN" => "Brunei", "BG" => "Bulgaria", "BF" => "Burkina Faso", "BI" => "Burundi", "KH" => "Cambodia", "CM" => "Cameroon", "CA" => "Canada", "CT" => "Canton and Enderbury Islands", "CV" => "Cape Verde", "KY" => "Cayman Islands", "CF" => "Central African Repu
@kevinn
kevinn / app.js
Created November 23, 2015 10:15 — forked from jrmoran/app.js
AngularJS - Charting with Flot
var App = angular.module('App', []);
@kevinn
kevinn / gifenc.sh
Last active March 31, 2017 04:27
High quality video to gif encoding using ffmpeg. From http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
#!/bin/sh
# http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# usage: ./gifenc.sh [input].mov [output].gif
palette="palette.png"
filters="fps=15,scale=-1:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
@kevinn
kevinn / css.css
Created February 19, 2018 05:36
github's font-stack
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
font-size: 14px;
line-height: 1.5;
}
code {
font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;
font-size: 12px;
}
@kevinn
kevinn / readme.md
Last active December 8, 2019 12:53
Make Windows Subsystem Linux/lxss a bit faster on Win10.

**NOTE: After re-installing WSL, node/npm is spouting errors on permissions on the filesystem
sudo umount /mnt/c sudo mount -t drvfs C: /mnt/c -o metadata

Make Windows Subsystem Linux/lxss a bit faster on Win10.

Seen from here: microsoft/WSL#1932

  1. Go to "Windows Defender Security Center" via start menu or searching after pressing the Windows key.
@kevinn
kevinn / checkUpdateTextFile.js
Last active May 30, 2018 07:10
Check for a text file (markdown) and check contents (if new), update the UI to show unread state, and then display a modal. Uses localStorage set to two items for unread and text content.
// uses https://github.com/markedjs/marked to read markdown files to html
// uses jQuery because we're on old angular version
var checkUpdatesFile = function() {
$.ajax({
url: '/static/updates.md'
}).done(function(data){
var updateText = data;
// check/store in localStorage for updated text from updates.md
@kevinn
kevinn / docker-compose.yml
Created November 9, 2018 15:58
wordpress using docker
version: '3'
services:
wordpress:
image: wordpress:latest
restart: always
links:
- mysql
ports:
- 8080:80
@kevinn
kevinn / vue-heroku.md
Created April 12, 2019 12:52
Deploy Vue.js app /dist to Heroku
  1. Add express and serve-static via npm:
$ npm install express serve-static
  1. Create file named heroku.js on at the root directory of a Vue.js project:
const express = require('express');
const serveStatic = require("serve-static")
const path = require('path');