Skip to content

Instantly share code, notes, and snippets.

View naeluh's full-sized avatar
🌐
Busy

nick hulea naeluh

🌐
Busy
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>R & C News</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="https://www.nhm.org/site/sites/all/themes/zen_nhm_theme/images/NHM_favicon.ico" rel="shortcut icon" type="image/x-icon">
<meta content="Natural History Museum of Los Angeles County" property="og:site_name">
<meta content="Extreme Mammals" property="og:title">
@naeluh
naeluh / index.html
Created April 12, 2017 23:56
Sanctuary Toolkit | ACLU of Southern California YELLOW BORDER ABSOLUTE DONE // source https://jsbin.com/hobeyu
<!DOCTYPE html>
<!--[if IEMobile 7]><html class="iem7" lang="en" dir="ltr"><![endif]-->
<!--[if lte IE 6]><html class="lt-ie9 lt-ie8 lt-ie7" lang="en" dir="ltr"><![endif]-->
<!--[if (IE 7)&(!IEMobile)]><html class="lt-ie9 lt-ie8" lang="en" dir="ltr"><![endif]-->
<!--[if IE 8]><html class="lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if IE 9]><html class="lt-ie10" lang="en" dir="ltr"><![endif]-->
<!--[if (gte IE 10)|(gt IEMobile 7)]><!--><html lang="en" dir="ltr" prefix="fb: http://ogp.me/ns/fb# og: http://ogp.me/ns# article: http://ogp.me/ns/article# book: http://ogp.me/ns/book# profile: http://ogp.me/ns/profile# video: http://ogp.me/ns/video# product: http://ogp.me/ns/product#"><!--<![endif]-->
<head>
<meta charset="utf-8" />
@naeluh
naeluh / index.html
Created April 12, 2017 06:27
Sanctuary Toolkit | ACLU of Southern California YELLOW BORDERWORKING FIXED DONE // source https://jsbin.com/hogebob
<!DOCTYPE html>
<!--[if IEMobile 7]><html class="iem7" lang="en" dir="ltr"><![endif]-->
<!--[if lte IE 6]><html class="lt-ie9 lt-ie8 lt-ie7" lang="en" dir="ltr"><![endif]-->
<!--[if (IE 7)&(!IEMobile)]><html class="lt-ie9 lt-ie8" lang="en" dir="ltr"><![endif]-->
<!--[if IE 8]><html class="lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if IE 9]><html class="lt-ie10" lang="en" dir="ltr"><![endif]-->
<!--[if (gte IE 10)|(gt IEMobile 7)]><!--><html lang="en" dir="ltr" prefix="fb: http://ogp.me/ns/fb# og: http://ogp.me/ns# article: http://ogp.me/ns/article# book: http://ogp.me/ns/book# profile: http://ogp.me/ns/profile# video: http://ogp.me/ns/video# product: http://ogp.me/ns/product#"><!--<![endif]-->
<head>
<meta charset="utf-8" />
@naeluh
naeluh / README.md
Created March 30, 2017 22:00 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
var inputs = document.getElementsByTagName("input");
for(var i = 0; i < inputs.length; i++) {
if(inputs[i].type == "checkbox") {
inputs[i].checked = true;
}
}
@naeluh
naeluh / autop.php
Created September 23, 2016 16:24 — forked from joshhartman/autop.php
Function to automatically add paragraphs to blocks of text with line breaks, ripped from WordPress
<?php
/**
* Replaces double line-breaks with paragraph elements.
*
* A group of regex replaces used to identify text formatted with newlines and
* replace double line-breaks with HTML paragraph tags. The remaining
* line-breaks after conversion become <<br />> tags, unless $br is set to '0'
* or 'false'.
*
* @param string $pee The text which has to be formatted.
@naeluh
naeluh / get_color_code.py
Created July 22, 2016 00:04 — forked from jayapal/get_color_code.py
get_color_code.py
from sklearn.cluster import KMeans
from sklearn import metrics
import cv2
# By Adrian Rosebrock
import numpy as np
import cv2
# Load the image
image = cv2.imread("red.png")
function checkRequired(e) {
valid = true;
type = $(e).attr('type');
if (type == 'radio') {
name = $(e).attr('name');
v = $("input[name='" + name + "']:checked").val();
if (!v) {
$("." + name + "_error").addClass("error");
valid = false;
}
var creativity = [{
space: function(artist, object) {
// check the artis and object being painted
if (!artist && !object) {
return allOtherSpace;
@naeluh
naeluh / trim.string.js
Created October 16, 2015 17:44 — forked from pbojinov/trim.string.js
Shorten string to specified max length and and append ... at the end. It will not cut in the middle of a word but at the minimum amount of words under the limit.
function trim(message, maxLength) {
var m = message;
var maxLen = maxLength;
//string is too long, lets trim it and append ...
if (m.length > maxLen) {
var lastSpace = m.lastIndexOf(' ');
//there is no space in the word
if (lastSpace === -1) {
m = m.slice(0, maxLen-3);