Skip to content

Instantly share code, notes, and snippets.

View piscis's full-sized avatar
🧱
¯\_(ツ)_/¯

Alex piscis

🧱
¯\_(ツ)_/¯
View GitHub Profile
@piscis
piscis / env.js
Created July 6, 2015 09:25
loadRemoteFile JSON test
var assert = require('assert');
describe('Environment test', function(){
it('It should not fail', function(){
assert.equal(1,1);
});
});
@piscis
piscis / SassMeister-input.scss
Created June 1, 2015 15:05
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@function convert($value, $currentUnit, $convertUnit){
@if $currentUnit == px{
@if $convertUnit == ems{
@return $value / 16+em;
<?xml version="1.0"?>
<gpx
version="1.0"
creator="ExpertGPS 1.1 - http://www.topografix.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<time>2002-02-27T17:18:33Z</time>
<bounds minlat="42.401051" minlon="-71.126602" maxlat="42.468655" maxlon="-71.102973"/>
<wpt lat="42.438878" lon="-71.119277">
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
# Created by https://www.gitignore.io
### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
@piscis
piscis / gist:eaec26b3ea6b0a6fa94a
Last active August 29, 2015 14:16
Traverse JSON Object
var obj = {
a:1,
b: {
c:2
},
d: [1,2,3,4]
};
function process(key,value) {
console.log(key,value)
@piscis
piscis / gist:0efa5d20da1a02799ca1
Created February 23, 2015 18:07
Typescript 2 Javascript
module Parallax {
export class ParallaxContainer {
private content: HTMLElement;
private perspective: number;
private surface: ParallaxSurface[];
/**
* Creates a Container for a Parallax
*
* @param {HTMLElement} scrollableContent The container that will be parallaxed
....
features = [List-with-FeaturePoints-generated-on-the-client]
vectorSource = new ol.source.GeoJSON(({
"object":
"type": "FeatureCollection"
"features": features
}));
vectorLayer = new ol.layer.Image({"source": new ol.source.ImageVector(
<?php if ( ! defined( 'WPINC' ) ) die;
/**
* Represents the view for the public-facing component of the plugin.
*
* This typically includes any information, if any, that is rendered to the
* frontend of the theme when the plugin is activated.
*
* @package FlowFlow
* @author Looks Awesome <email@looks-awesome.com>
* @link http://looks-awesome.com
@piscis
piscis / gist:3b3df53241fdbb859c07
Last active September 15, 2018 16:01
MongoDB: Drop all indexes on all collections in one database
db.getCollectionNames().forEach( function (d) {
db[d].dropIndexes();
});
db.tilezoom_source.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );
db.tilezoom_artefacts.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );
db.mosaic_artefact.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );
db.mosaic_artefact_index.chunks.ensureIndex( { files_id: 1, n: 1 }, { unique: true } );