This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const clone = array => [ ...array ]; | |
const push = (array, item) => [ ...array, item ]; | |
const pop = array => x.slice(0, -1); | |
const unshift = (array, item) => [ item, ...array ]; | |
const shift = array => array.slice(1); | |
const sort = (array, fn) => [ ...array ].sort(fn); | |
const delete = (array, index) => [ ...array.slice(0, inedx), ...array.slice(index+1) ]; | |
const splice = (array, start, deleteCount, ...items) => [ ...array.slice(0, start), ...items, ...array.slice(start + deleteCount) ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var posthtml = require('posthtml'); | |
var minifyClassnames = require('posthtml-minify-classnames'); | |
var minifier = require('posthtml-minifier'); | |
module.exports = function(grunt) { | |
'use strict'; | |
grunt.registerTask('posthtml', 'Posthtml processing...', function() { | |
var done = this.async(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.bluetooth.bledemo; | |
import java.util.HashMap; | |
import android.util.SparseArray; | |
public class BleNamesResolver { | |
private static HashMap<String, String> mServices = new HashMap<String, String>(); | |
private static HashMap<String, String> mCharacteristics = new HashMap<String, String>(); | |
private static SparseArray<String> mValueFormats = new SparseArray<String>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.flyingrub.mibandnotify.miband; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.UUID; | |
public class MiBandService { | |
public static final String MAC_ADDRESS_FILTER = "88:0F:10"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'up' => array( | |
'INSERT INTO {{database}}.{{prefix}}table ...' | |
), | |
'down' => array( | |
'DROP TABLE {{database}}.{{prefix}}table ...' | |
), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jss from 'jss'; | |
import preset from 'jss-preset-default'; | |
import cx from 'classnames'; | |
import {html, render} from 'lit-html/lib/lit-extended'; | |
import {connect} from 'lit-redux'; | |
import {withForm} from 'lit-form'; | |
import {createStore, applyMiddleware, bindActionCreators} from 'redux'; | |
import logger from 'redux-logger'; | |
jss.setup(preset()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @atrists = ( | |
SELECT | |
event_artist.id | |
FROM | |
event_artist | |
WHERE | |
event_artist.event_id IN ( | |
SELECT | |
event.id | |
FROM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {fetch} = window; | |
export const upload = (file, endpoint) => { | |
return new Promise((resolve, reject) => { | |
const formData = new FormData(); | |
formData.append('file', file); | |
fetch( | |
endpoint, | |
{ | |
method: 'POST', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react" | |
], | |
"env": { | |
"browser": true, | |
"node": true, | |
"mocha": true, | |
"es6": true |