Skip to content

Instantly share code, notes, and snippets.

View M1r1k's full-sized avatar

Artem M1r1k

  • Uniform
  • Copenhagen, Denmark
View GitHub Profile
@M1r1k
M1r1k / us-harmony-tour-map.js
Last active July 19, 2019 14:07
JS for USA Harmony Tour custom location map
"use strict";
var map; // initialize map
window.initMap = function () {
var mapContainer = document.getElementById('map-canvas');
if (!mapContainer) {
return;
}
@M1r1k
M1r1k / us-harmony-tour-map.css
Last active July 19, 2019 13:30
CSS for USA Harmony Tour locations map
#map-canvas {
height: 55vh;
}
#map-canvas {
}
.gm-style .gm-style-iw {
top: -35px !important;
}
@M1r1k
M1r1k / canada_provinces.geo.json
Last active June 10, 2022 11:12
canada-provinces-geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@M1r1k
M1r1k / TextInput.jsx
Created August 31, 2016 14:21
Magic of ES6
import React, { PropTypes } from 'react';
import FormInput from './FormInput';
const TextInput = (props) => {
let {onChange, validate, errorText, name, ...properties} = props;
const handleChange = (e) => onChange(name, e.target.value);
const handleValidation = (e) => validate && validate({[name]: e.target.value});
return (
<FormInput errorText={props.errorText}>
// Generated on 2014-11-29 using generator-angular 0.10.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@M1r1k
M1r1k / gist:840f4993abc3ee87d563
Created July 29, 2014 09:26
Use db_select instead of db_query in the loop
@@ -45,10 +46,17 @@ function pp_frontpage_most_content_type_render($subtype, $conf, $panel_args, $co
);
$table_header = array(t('user'), t('counter'));
foreach ($types as $title => $data_type) {
- $query_results = db_query($query, array(
- ':type' => $data_type,
- ':timestamp' => $last_thee_months,
- ))->fetchAllKeyed();
+ $query = db_select('ppgetstat', 'ppst');
+ $query->rightJoin('field_data_field_user_id', 'fuid', 'fuid.field_user_id_value = ppst.doid');