Skip to content

Instantly share code, notes, and snippets.

@elfmimi
elfmimi / Lily58-Nicola.kbd.json
Last active October 29, 2024 20:39
Lily58 親指シフト
[
{"name": "Lily58 親指シフト"},
[{x:3,a:7},"",{x:6.5},""],
[{y:-0.94,x:2},"",{x:1,a:4},"\n\n「",{x:4.5},"』",{x:1,a:7},""],
[{y:-0.86,x:5,a:4},"\n\n」",{x:2.5},"『"],
[{y:-0.95,x:1},"!\n\n?",{x:10.5,a:7},""],
[{y:-0.94},"",{x:12.5},""],
[{y:-0.31,x:3,a:4,f:5},"り\n\nだ\n\n\n\n\n\n\n\nた",{x:6.5},"ぐ\n\nる\n\n\n\n\n\n\n\nく"],
[{y:-0.94,x:2},"え\n\nが\n\n\n\n\n\n\n\nか",{x:1},"ゃ\n\nご\n\n\n\n\n\n\n\nこ",{x:4.5},"ぢ\n\nに\n\n\n\n\n\n\n\nち",{x:1},"づ\n\nま\n\n\n\n\n\n\n\nつ"],
[{y:-0.86,x:5},"れ\n\nざ\n\n\n\n\n\n\n\nさ",{x:2.5},"ぱ\n\nよ\n\n\n\n\n\n\n\nら"],
@granmoe
granmoe / React Join Children
Last active December 7, 2022 14:50
Ever wanted to join react children like you join an array?
This file is only here to provide the title of the gist
@cristiandley
cristiandley / react-leaflet-heatmap.js
Last active January 16, 2017 09:10
Trying to migrate leaflet-heatmap to react
import _ from 'lodash';
import L from 'leaflet';
import React from 'react';
import h337 from 'heatmap.js';
import { MapLayer } from 'react-leaflet';
import ReactDOM, { render } from 'react-dom';
class ReactLeafletHeatmap extends MapLayer {
constructor(props, context) {
@mikechau
mikechau / 00_README.md
Last active May 19, 2024 13:34
Logging Rails 4 to Syslog, formatted w/ Logstash

Logging Rails 4 to Syslog, formatted w/ Logstash

Getting Started

Steps to get Rails 4 saving its output to Syslog via Rsyslog. This assumes you are on CentOS, but should be pretty adaptable to any other distribution. Ruby 2.0+ is also required.

  1. Add the gems lograge and logstash-event to your Gemfile. Feel free to remove from production if you'd like to test it in development as well or something.
  2. Update production.rb with the lograge settings and set the logger to Syslog::Logger.
  3. Add the conf files to /etc/rsyslog.d/. /etc/rsyslog.conf should have $IncludeConfig /etc/rsyslog.d/*.conf enabled, so it will load any additional configs from /etc/rsyslog.conf.
@makmanalp
makmanalp / comparison.md
Last active June 10, 2024 14:24
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@gxespino
gxespino / ProgrammingManifesto.md
Last active February 4, 2021 01:01
Glenn's Path to Becoming a Ruby/Rails Programmer (Sept 2014 - Sept 2015)

#Programming Manifesto

##Books Ruby

  • Learn to Program by Chris Pine
  • The Well-Grounded Rubyist by David Black
  • Eloquent Ruby by Russ Olsen
  • Practical Object-Oriented Design in Ruby by Sandi Metz
  • Confident Ruby by Avdi Grimm
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@webdevotion
webdevotion / self-signed-localhost-for-rails.txt
Last active March 21, 2019 16:02 — forked from trcarden/gist:3295935
SSL self signed localhost for rails start to finish, no red warnings.
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@yctay
yctay / figaro-capistrano.rb
Created April 30, 2013 05:34
Capistrano recipe for deploying figaro's application.yml
namespace :figaro do
desc "SCP transfer figaro configuration to the shared folder"
task :setup do
transfer :up, "config/application.yml", "#{shared_path}/application.yml", :via => :scp
end
desc "Symlink application.yml to the release path"
task :finalize do
run "ln -sf #{shared_path}/application.yml #{release_path}/config/application.yml"
end
@madtrick
madtrick / remote_authenticatable.rb
Created October 19, 2012 08:43
Example module to perform remote authentication with Devise
module Devise
module Models
module RemoteAuthenticatable
extend ActiveSupport::Concern
#
# Here you do the request to the external webservice
#
# If the authentication is successful you should return
# a resource instance