Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / data.cirru
Created November 3, 2015 20:08 — forked from tiye/data.cirru
GitHub supported languages(except Kicad, "MiniD: # Legacy"), Cirru is 249th
{
"ABAP": 68,
"AGS Script": 11,
"AMPL": 1,
"ANTLR": 139,
"APL": 14,
"ASP": 8411,
"ATS": 22,
"ActionScript": 17637,
"Ada": 821,
var data = ["ActionScript", "C", "C#", "C++", "Clojure", "CoffeeScript", "CSS", "Go", "Haskell", "HTML", "Java", "JavaScript", "Lua", "Matlab", "Objective-C", "Perl", "PHP", "Python", "R", "Ruby", "Scala", "Shell", "Swift", "TeX", "VimL", "ABAP", "Ada", "Agda", "AGS Script", "Alloy", "AMPL", "Ant Build System", "ANTLR", "ApacheConf", "Apex", "API Blueprint", "APL", "AppleScript", "Arc", "Arduino", "AsciiDoc", "ASP", "AspectJ", "Assembly", "ATS", "Augeas", "AutoHotkey", "AutoIt", "Awk", "Batchfile", "Befunge", "Bison", "BitBake", "BlitzBasic", "BlitzMax", "Bluespec", "Boo", "Brainfuck", "Brightscript", "Bro", "C-ObjDump", "C2hs Haskell", "Cap'n Proto", "CartoCSS", "Ceylon", "Chapel", "ChucK", "Cirru", "Clarion", "Clean", "CLIPS", "CMake", "COBOL", "ColdFusion", "ColdFusion CFC", "Common Lisp", "Component Pascal", "Cool", "Coq", "Cpp-ObjDump", "Creole", "Crystal", "Cucumber", "Cuda", "Cycript", "Cython", "D", "D-ObjDump", "Darcs Patch", "Dart", "desktop", "Diff", "DIGITAL Command Language", "DM", "Dockerfile",
@Teino1978-Corp
Teino1978-Corp / StackExchangeTags.js
Created November 3, 2015 19:22 — forked from shivkumarganesh/StackExchangeTags.js
This Program helps you to download all the StackExchangeTags from the StackExchange Website. Kinda jumbled up to look but works well. You just need to get the API key and add it with a valid MongoDB url.
var siteList={
"items":
[ { "api_site_parameter": "stackoverflow" },
{ "api_site_parameter": "serverfault" },
{ "api_site_parameter": "superuser" },
{ "api_site_parameter": "meta.stackoverflow" },
{ "api_site_parameter": "webapps" },
{ "api_site_parameter": "meta.webapps" },
{ "api_site_parameter": "gaming" },
{ "api_site_parameter": "meta.gaming" },
/*
Bernstein function:
1 = t + (1 - t)
Cuadratic beizer:
12 = (t + (1 - t))2
» 1 = t2 + 2t(1 - t) + (1 - t)2
Cuadratic beizer 3rd:
13 = (t + (1 - t))3
@Teino1978-Corp
Teino1978-Corp / CSS gradient cross browser
Created November 3, 2015 18:58 — forked from luishdez/CSS gradient cross browser
CSS gradient cross browser
background: #f78d1d;
background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
background: -moz-linear-gradient(top, #faa51a, #f47a20);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
// This is a port of an old scheme implementation of a Mathematica style 'Take' function
// (https://gist.github.com/379285)
//
// It takes the same arguments documented here: http://reference.wolfram.com/mathematica/ref/Take.html
//
// `take(arr, n);` returns the first `n` elements of `arr`
// `take(arr, -n);` returns the last `n` elements of `arr`
// `take(arr, [m, n]);` returns elements `m` through `n` of `arr`
// `take(arr, pat1, pat2, ...)` gives a nested array in which elements specified by `pat-i` are
// taken at level i in arr
body {
font-family: Arial, Tahoma, sans-serif;
border: 0px solid black;
padding: 0px;
margin: 0px;
}
#header {
border: 0px;
width: 50%;

The jQuery special events API is a fairly flexible system by which you can specify bind and unbind hooks as well as default actions for custom events. In using this API, you can create custom events that do more than just execute bound event handlers when triggered--these "special" events can modify the event object passed to event handlers, trigger other entirely different events, or execute complex setup and teardown code when event handlers are bound to or unbound from elements.

Note that this article uses some advanced jQuery techniques and assumes you understand the concepts of custom events and event delegation using bubbling.

Also, because this article is rather long, it has been broken up into sections. I'd recommend reading it in order, one section at a time, because techniques used in subsequent examples often reference those used in previo

@Teino1978-Corp
Teino1978-Corp / gist:19fdd9f0259a836f51db
Created November 3, 2015 03:19
jQuery Validation - No Special Characters allowed (not allowing < > # )
// Thanks to this site to help out on RegEx - http://www.regexr.com/
require(["jQueryValidate"], function(){
// dont allow < > # \ /
// add alphanumeric validator
jQuery.validator.addMethod("noSpecialCharacter", function(value, element) {
var regex = new RegExp("[<>#]+");
var key = value;