Skip to content

Instantly share code, notes, and snippets.

View ilyador's full-sized avatar

Ilya Dorman ilyador

View GitHub Profile
@gsans
gsans / gist:5929028e2b41a89e24ad8641638ba983
Last active August 31, 2019 12:33
Delete a batch of items using GraphQL
# GraphQL query
mutation batchDelete($a:ID $b:ID $c:ID $d:ID $e:ID) {
a:deleteItem(input:{ id:$a }) { id }
b:deleteItem(input:{ id:$b }) { id }
c:deleteItem(input:{ id:$c }) { id }
d:deleteItem(input:{ id:$d }) { id }
e:deleteItem(input:{ id:$e }) { id }
}
# Query variables
@EliyaD
EliyaD / ColorPicker.js
Created November 30, 2017 12:46
Material UI color picker using react-color
import React, { Component } from 'react' // v16.1.1
import { withStyles } from 'material-ui/styles' // v1.0.0-beta.21
import { SketchPicker } from 'react-color' // v2.13.8
import Input, { InputLabel, InputAdornment } from 'material-ui/Input'
import { FormControl } from 'material-ui/Form'
import IconButton from 'material-ui/IconButton'
const styles = theme => ({
root: {
@ilyador
ilyador / tooltip.css
Last active August 29, 2015 14:23
CSS-only animated tooltips
/* Originally by Chris Bracco with a few cleanups and fixes http://cbracco.me/a-simple-css-tooltip/ */
/* Base styles for the element that has a tooltip */
[tooltip],
.tooltip {
position: relative;
cursor: pointer;
}
/* Base styles for the entire tooltip */
@shaneriley
shaneriley / mixins.jade
Created February 10, 2014 20:10
Jade mixins example
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
@jamesmacaulay
jamesmacaulay / Clojure.sublime-settings
Last active January 18, 2021 19:01
Clojure stuff for Sublime Text 2. Files live in ~/Application Support/Sublime Text 2/Packages/User
// installed Clojure packages:
//
// * BracketHighlighter
// * lispindent
// * SublimeREPL
// * sublime-paredit
{
"word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?",
"paredit_enabled": true,
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@kentbrew
kentbrew / favicon-interceptor.js
Created January 3, 2011 19:32
How to short-circuit those annoying favicon requests in node.js
// early experiments with node had mysterious double requests
// turned out these were for the stoopid favicon
// here's how to short-circuit those requests
// and stop seeing 404 errors in your client console
var http = require('http');
http.createServer(function (q, r) {
// control for favicon