Skip to content

Instantly share code, notes, and snippets.

View kulicuu's full-sized avatar

J Wylie Кулик kulicuu

View GitHub Profile
@lykmapipo
lykmapipo / gist:6a8f56aec23fda81796530ae87b13ec8
Created April 27, 2016 11:59 — forked from klovadis/gist:5170485
A Lua script for Redis that allows you to set hash values based on a dictionary table
-- sets all fields for a hash from a dictionary
local hmset = function (key, dict)
if next(dict) == nil then return nil end
local bulk = {}
for k, v in pairs(dict) do
table.insert(bulk, k)
table.insert(bulk, v)
end
return redis.call('HMSET', key, unpack(bulk))
end
@zackify
zackify / gist:861d6ed399f2ffa55c7d
Created May 12, 2015 04:53
ES6 classes and module loading is too easy with webpack:)
module.exports = {
entry: {
jobs: 'app.jsx'
},
output: {
filename: "[name].bundle.js",
chunkFilename: "[id].bundle.js"
},
module: {
loaders: [
@akre54
akre54 / react-svg-patch.coffee
Last active November 23, 2015 18:02
React SVG element monkeypatch
ReactDOM = require 'react/lib/ReactDOM'
ReactElement = require 'react/lib/ReactElement'
ReactElementValidator = require 'react/lib/ReactElementValidator'
SVGDOMPropertyConfig = require 'react/lib/SVGDOMPropertyConfig'
MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE
createFactory = if __DEV__
ReactElementValidator.createFactory
else
ReactElement.createFactory
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@robertmarsal
robertmarsal / gist:9feaa9150926efa4175a
Created December 17, 2014 21:09
Install f.lux on Ubuntu 14.10
sudo apt-get install python-glade2 python-appindicator
git clone https://github.com/Kilian/f.lux-indicator-applet.git
cd f.lux-indicator-applet
chmod +x setup.py
sudo ./setup.py install
fluxgui

Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward discussions repo

io.js - what you need to know

io-logo-substack

  • io is a fork of node v0.12 (the next stable version of node.js, currently unreleased)
  • io.js will be totally compatible with node.js
  • the people who created io.js are node core contributors who have different ideas on how to run the project
  • it is not a zero-sum game. many core contributors will help maintain both node.js and io.js
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

# Kata description: http://codingdojo.org/cgi-bin/index.pl?KataTennis
module Tennis
class Player
attr_reader :name, :points_won
def initialize(name)
@name = name
@points_won = 0
end
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@joshski
joshski / flame.lua
Created April 21, 2013 10:52
Generates a little flame. Works in Codea.
-- a little flame in a functional style
function particle(step, style, t)
local newStyle = step(style, t)
return {
style = newStyle,
next = function()
return particle(step, newStyle, t + 1)
end
}