Skip to content

Instantly share code, notes, and snippets.

View rhzs's full-sized avatar
:bowtie:
Simplicity's matters

Ryuici rhzs

:bowtie:
Simplicity's matters
View GitHub Profile
@bpierre
bpierre / README.md
Last active February 15, 2024 18:40
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0

@chantastic
chantastic / on-jsx.markdown
Last active November 10, 2024 13:39
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@csm123
csm123 / index.html.haml
Last active April 12, 2017 07:56
React/Fluxxor in Rails Example
:javascript
$(document).ready(function() {
window.loadIngredientSuggestionsEditor(#{@ingredients});
});
%h1 Edit ingredient suggestions
#js-ingredient-suggestions-editor
@rhzs
rhzs / RhezaSatriaHerokuLogReportStatistic.py
Last active August 29, 2015 14:12
Heroku Log Report Statistic (Num of called urls, Response time, and dyno)
#!/usr/bin/python
import time
import resource
import re
from collections import Counter
from threading import Thread
class ThreadLogFile(Thread):
mdesales@ubuntu [11/30/201423:36:56] ~/dev/github-intuit/docker-images/platform/mule-3.4/source (master *) $ go run trying.go
Will start downloading file1... It might take 3787
Will start downloading file2... It might take 8639
Will start downloading file3... It might take 5633
FINISHED: file1 downloaded in 3787
FINISHED: file3 downloaded in 5633
FINISHED: file2 downloaded in 8639
[file1 downloaded in 3787 file3 downloaded in 5633 file2 downloaded in 8639]
8.641097774s
@kachayev
kachayev / concurrency-in-go.md
Last active May 4, 2025 05:48
Channels Are Not Enough or Why Pipelining Is Not That Easy
@spoike
spoike / reflux.js
Created June 29, 2014 22:23
A simpler implementation of React.JS's Flux
var EventEmitter = require('events').EventEmitter,
_ = require('lodash');
/**
* Creates an action functor object
*/
exports.createAction = function() {
var action = new EventEmitter(),
eventLabel = "action",
@jkreps
jkreps / benchmark-commands.txt
Last active March 8, 2025 12:25
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@marc0der
marc0der / wallpapers.groovy
Created April 5, 2014 16:59
A wallpaper downloader using Geb
@Grab("org.codehaus.geb:geb-core:0.7.2")
@Grab("org.seleniumhq.selenium:selenium-chrome-driver:2.32.0")
import geb.*
import static java.net.URLDecoder.decode
def images = new HashSet()
def userHome = System.getProperty('user.home')
def pictureFolder = "${userHome}/Pictures"
@plentz
plentz / nginx.conf
Last active May 3, 2025 05:27
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048