Skip to content

Instantly share code, notes, and snippets.

View omniosi's full-sized avatar

Ornette Coleman omniosi

View GitHub Profile
pointer-events: none // disables links via CSS alone
const classification = {
title: "Content Classification",
checks: ["Certified","Uncertified","My Favorites"]
}
const geo = {
title: "Geo",
checks: ["APLA","China","EMEA","North America","Global"]
}
const type = {
title: "Content Type",
@omniosi
omniosi / illegal-character-replace-regex
Last active November 28, 2017 22:06
replace URL illegal characters with hyphen using RegEx
" 0123456789 _+-.,!@#$%^&*();\/|<>"'~`?=:".replace(/[\/\s&!@#$%^*(){}[\];\\|<>"'?,.~`+=:]/g,'-')
// http://regexr.com/3h9d0
/* To quote section 2.3 of RFC 3986:
"Characters that are allowed in a URI but do not have a reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde."
ALPHA DIGIT "-" / "." / "_" / "~"
*/
@omniosi
omniosi / git-terminal-commands
Last active August 10, 2018 17:59
A list of useful terminal commands for Git
git commit file1 file2 file5 -m "commit message" ## add specific files and commit in one line
git commit -am "commit message" ## add all files and commt in one line - does not include new files
git push -u origin hotfix ## push a new branch to the remote
$ git push origin --delete <branch_name> ## delete remote branch
git checkout -b localbranchname origin/remotebrachname ## make local version of remote branch with tracking
git reset HEAD~ ## undo commit
git reset --hard HEAD^ ## undo local commit
git checkout -b newbranch SHAa9c146a09505837ec03b ## create a new branch from a previous commit
$ git tag -a v1.4 -m "my version 1.4" ## create a tag (https://git-scm.com/book/en/v2/Git-Basics-Tagging)
@omniosi
omniosi / merge-strategies.txt
Created September 15, 2016 17:31
Merge Strategies to remember
// overwrite the current branch with the current state of the master branch
git merge -X theirs master
@omniosi
omniosi / about.html
Created September 2, 2016 00:01
angular1-router-states
<h3>Its the UI-Router hello world app!</h3>
@omniosi
omniosi / logo-anim-test.html
Created February 1, 2016 06:22
animate drawing logo using SVG mask
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>logo animation test</title>
</head>
<body>
<svg version="1.1" id="odc-logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="600px" height="90px" viewBox="0.5 792.5 600 90" enable-background="new 0.5 792.5 600 90" xml:space="preserve">
<defs>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.image{
width: 30px;
/*width: 0;*/
height: 10px;
@omniosi
omniosi / http-server
Created August 11, 2014 19:38
create a local basic HTTP server in terminal
// Python 2.x:
python -m SimpleHTTPServer
// Python 3.x:
python -m http.server
// test the web server at http://localhost:8000/
<IfModule mod_deflate.c>
# Insert filter
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>