Skip to content

Instantly share code, notes, and snippets.

View bajzarpa's full-sized avatar

Arpad Bajzath bajzarpa

View GitHub Profile
@fworks
fworks / install-zsh-windows-git-bash.md
Last active April 19, 2024 19:52
Zsh / Oh-my-zsh on Windows Git Bash

@kangax's ES6 quiz, explained

@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).

Here we go with the explanations:

Question 1:
(function(x, f = () => x) {
@totya24
totya24 / index.php
Last active June 23, 2016 08:22
jQuery method usage statistic
<?php
/** included from: https://github.com/neitanod/forceutf8 */
class Encoding {
const ICONV_TRANSLIT = "TRANSLIT";
const ICONV_IGNORE = "IGNORE";
const WITHOUT_ICONV = "";
protected static $win1252ToUtf8 = array(
128 => "\xe2\x82\xac",
@paulirish
paulirish / what-forces-layout.md
Last active May 6, 2024 07:54
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@dgp
dgp / youtube api video category id list
Created June 11, 2015 05:57
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 6, 2024 12:29
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@msimpson
msimpson / scroll-test.html
Last active November 17, 2020 10:09
Mac OSX Inertial Scrolling Buffer (http://jsfiddle.net/n7bk6pb9/1/)
<!doctype html>
<html>
<head>
<title>Scroll Test</title>
<style>
html, body {
overflow: hidden;
width: 100%;
height: 100%;
@attilah
attilah / cleanData override
Created August 1, 2014 21:26
Angular 1.2+, jQuery 2.1+, jQuery UI 1.x+ include order
If you're using Angular 1.2+, jQuery 2.1+, jQuery UI 1.x+ together, you can easily get a weird error like this:
TypeError: undefined is not a function
at replaceWith (http://myapp.com/app/bower_components/angular/angular.js:7289:26)
at applyDirectivesToNode (http://myapp.com/app/bower_components/angular/angular.js:6518:13)
at compileNodes (http://myapp.com/app/bower_components/angular/angular.js:6167:15)
at compileNodes (http://myapp.com/app/bower_components/angular/angular.js:6179:15)
at compile (http://myapp.com/app/bower_components/angular/angular.js:6107:15)
at http://myapp.com/app/bower_components/angular/angular.js:1506:11
at Scope.$eval (http://myapp.com/app/bower_components/angular/angular.js:12903:28)
@buckeyeworldcitizen
buckeyeworldcitizen / bdayclock
Last active February 4, 2019 14:47
Birthday word clock
//Theres two parts to this code: first the birthday part and then the clock part which i had on separate arduinos.
//The first section is original and the second is modified from Joe Caldwell at http://www.highonsolder.com who modified it from Scott Bezek who modified it from Doug Jackson
//Good luck
#include <Wire.h>
#include "RTClib.h"
#include <Adafruit_NeoPixel.h>