Skip to content

Instantly share code, notes, and snippets.

View vincentntang's full-sized avatar
💭
¯\_(ツ)_/¯

Vincent Tang vincentntang

💭
¯\_(ツ)_/¯
View GitHub Profile
@jojobyte
jojobyte / ContextCmder-Disable.reg
Last active May 13, 2024 12:38
Cmder Context (Right-Click) Menu for Windows 7, 8, 10 & 11
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active May 20, 2024 06:34
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@planetoftheweb
planetoftheweb / sassfiles.scss
Last active February 23, 2020 11:52
Sass Files for my course on workflows
// style.scss
// ==============
//Compass imports
@import "compass";
@import "compass/css3/box-shadow";
//Core partials
@import "variables";
@import "mixins";
@planetoftheweb
planetoftheweb / data.json
Created May 8, 2014 23:20
data.json file for a list of speakers.
{ "speakers" : [
{
"name":"Mr Bellingham",
"shortname":"Barot_Bellingham",
"reknown":"Royal Academy of Painting and Sculpture",
"bio":"Barot has just finished his final year at The Royal Academy of Painting and Sculpture, where he excelled in glass etching paintings and portraiture. Hailed as one of the most diverse artists of his generation, Barot is equally as skilled with watercolors as he is with oils, and is just as well-balanced in different subject areas. Barot's collection entitled \"The Un-Collection\" will adorn the walls of Gilbert Hall, depicting his range of skills and sensibilities - all of them, uniquely Barot, yet undeniably different"
},
{
"name":"Jonathan G. Ferrar II",
"shortname":"Jonathan_Ferrar",
@planetoftheweb
planetoftheweb / rclick.js
Created May 8, 2014 22:42
Right click on images with a class of rclick to let you preview high res versions.
var rclick = function() {
var myNodes = document.querySelectorAll(".rclick");
for (var i=0; i<myNodes.length; i++) {
myNodes[i].addEventListener("contextmenu", function(e) {
e.preventDefault();
if (e.target.tagName === 'IMG') {
if (document.querySelector('.preview')== null) {
var myElement = document.createElement('div');
myElement.className = 'preview';
@planetoftheweb
planetoftheweb / pixgrid.js
Created May 8, 2014 22:40
Lightbox that reads from a list of images with a class called pixgrid and then shows high res versions in a lightbox.
var pixgrid = function() {
function centerImage(theImage) {
var myDifX = (window.innerWidth - theImage.width) / 2, myDifY = (window.innerHeight - theImage.height) / 2;
return theImage.style.top = myDifY + "px", theImage.style.left = myDifX + "px",
theImage;
}
var myNodes = document.querySelectorAll(".pixgrid");
for (var i=0; i<myNodes.length; i++) {
myNodes[i].addEventListener("click", function(e) {
if ("IMG" === e.target.tagName) {
@planetoftheweb
planetoftheweb / tagline.coffee
Created May 8, 2014 16:39
Sample CoffeeScript files for my ultimate workflows course
do fill = (item = 'The most creative minds in Art') ->
$('.tagline').append "#{item}"
fill
@ivandrofly
ivandrofly / Unicode table
Created May 4, 2014 02:20
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character:
@samwize
samwize / mocha-guide-to-testing.js
Created February 8, 2014 05:53
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@azat-co
azat-co / jquery-api.md
Last active November 2, 2022 19:33
The list of most commonly used jQuery API functions

Here is the list of most commonly used jQuery API functions:

  • find(): Selects elements based on the provided selector string
  • hide(): Hides an element if it was visible
  • show(): Shows an element if it was hidden
  • html(): Gets or sets an inner HTML of an element
  • append() Injects an element into the DOM after the selected element
  • prepend() Injects an element into the DOM before the selected element
  • on(): Attaches an event listener to an element
  • off() Detaches an event listener from an element