Skip to content

Instantly share code, notes, and snippets.

View gajus's full-sized avatar

Gajus Kuizinas gajus

View GitHub Profile
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, () => {
This announcement is preparatory to the forthcoming tender for the exploration and extraction of Lithuanian amber resources.
It was proposed that the tax should be 20% that of the amber market value. However, amber market prices in Lithuania have not been reviewed since 1992. In comparison, the same tax ranges between 15-25% in the rest of the European Union. This is equal to an increase from 20.2 EUR/kg to 280 EUR/kg for the amber fraction of up to 40 millimeters, and up to 900 EUR/kg for amber fraction greater than 40 millimeters.
After the government meeting Prime Minister Algirdas Butkevičius told reporters that tax increase should not deter potential amber exploration and production bidders:
“The international demand and price of amber is considerably higher. It is not a cheap commodity.” – said the Lithuanian prime minister.
According to the Ministry of Environment, tax increase will generate an income of 41 million EUR: