Skip to content

Instantly share code, notes, and snippets.

View gajus's full-sized avatar

Gajus Kuizinas gajus

View GitHub Profile
@gajus
gajus / SassMeister-input-HTML.html
Created October 30, 2015 12:10
Generated by SassMeister.com.
<div class='icon'></div>
export type cell = string;
export type row = Array<cell>;
return request('http://www.everymancinema.com/venues/')
.then(function (response) {
let $ = response.data,
locations = [];
$('.main .content a[href^="/venues/"]').each(function () {
locations.push({
nid: layman.match($(this).attr('href'), /venues\/([^\/]+)\//),
name: $(this).find('img').attr('alt'),
url: 'http://www.everymancinema.com' + $(this).attr('href')
@gajus
gajus / filmData.js
Last active September 25, 2015 13:55
jsdom.env({
html: '<script>var filmData = {foo: "bar"};</script>',
features: {
ProcessExternalResources: true
},
done: (error, window) => {
if (error) {
throw new Error('Something is up!');
}
@gajus
gajus / index.js
Created September 16, 2015 19:56
import React from 'react';
import ReactDOM from 'react-dom';
import YouTubePlayer from 'react-youtube-player';
class Parent extends React.Component {
constructor () {
super();
this.state = {};
for d in */ ; do
dirName=$d;
dirName=${dirName//\/}
if [-f "$dirName.sql"]; then
echo "File found!"
fi
done;
@gajus
gajus / README.md
Last active August 28, 2015 07:08

File Name

File containing JavaScript must have ".js" extension.

Bad:

index.jsx
/**
* @fileoverview Validates JSDoc comments are syntactically correct
* @author Nicholas C. Zakas
* @copyright 2014 Nicholas C. Zakas. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
@gajus
gajus / wm.js
Last active March 12, 2018 14:44
let doFoo = new WeakMap(),
doBar = new WeakMap();
class Foo {
constructor () {
doFoo.set(this, () => {
// definition of doFoo for the instance of Foo.
});
doBar.set(this, () => {