Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
| import routeHandler from '../src/routeHandler'; | |
| import { mockResponse, mockRequest } from './test-helpers'; | |
| jest.mock('@googlemaps/google-maps-services-js'); | |
| import { Client } from '@googlemaps/google-maps-services-js'; | |
| const mockClient = { | |
| geocode: jest.fn(), | |
| }; |
| import gql from 'graphql-tag' | |
| const FRAGMENT_REPOSITORY = gql` | |
| fragment repository on Repository { | |
| name | |
| url | |
| createdAt | |
| description | |
| descriptionHTML | |
| labels { |
| if ('NodeList' in window && !NodeList.prototype.forEach) { | |
| console.info('polyfill for IE11'); | |
| NodeList.prototype.forEach = function (callback, thisArg) { | |
| thisArg = thisArg || window; | |
| for (var i = 0; i < this.length; i++) { | |
| callback.call(thisArg, this[i], i, this); | |
| } | |
| }; | |
| } |
| <?php | |
| /** | |
| * @package TinyMCE_example_plugin | |
| * @version 1.0 | |
| */ | |
| /* | |
| Plugin Name: TinyMCE example plugin | |
| Plugin URI: http://wordpress.org/extend/plugins/# | |
| Description: This is an example plugin | |
| Author: Your Name |
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
| // Based on http://pragmaticintegrator.wordpress.com/2013/08/16/writing-a-hadoop-mapreduce-task-in-java/ | |
| package net.twasink.hadoop; | |
| import java.io.File; | |
| import java.net.URI; | |
| import org.apache.commons.io.FileUtils; | |
| import org.apache.hadoop.conf.Configuration; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.LongWritable; |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| import com.google.gson.Gson; | |
| import com.google.gson.JsonSyntaxException; | |
| import com.android.volley.AuthFailureError; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.ParseError; | |
| import com.android.volley.Request; | |
| import com.android.volley.Response; | |
| import com.android.volley.Response.ErrorListener; | |
| import com.android.volley.Response.Listener; |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| ActionDispatch::Request.any_instance.stub(:remote_ip).and_return("192.168.0.1") |