Skip to content

Instantly share code, notes, and snippets.

View kazu69's full-sized avatar
:octocat:
⭐️ 🚀 🍻 🍶

kazu69 kazu69

:octocat:
⭐️ 🚀 🍻 🍶
View GitHub Profile
@kazu69
kazu69 / main.js
Created April 25, 2018 16:06
Vue.js reactive object pattern
// Vue.js like reactive object pattern
// show detail https://github.com/vuejs/vue/blob/master/src/core/observer/index.js
const Watcher = function() {}
Watcher.prototype.update = function () {
console.log('Watcher update')
}
const Dep = function(watcher) {
this.id = this.id ? this.id ++ : 0
this.subs = []
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
custom-checkbox {
@kazu69
kazu69 / Readme.md
Created January 29, 2018 15:00
Fibonacci algorithm in Javascript

performance

general.js > memonize.js > simple-loop.js

@kazu69
kazu69 / Readme.md
Last active September 12, 2016 16:09
Bypassa CSP form-action XSS example

Bypassa CSP form-action XSS example

try

bundle install
bundle exec ruby app.rb

[2016-09-10 00:01:46] INFO  WEBrick 1.3.1
[2016-09-10 00:01:46] INFO ruby 2.2.2 (2015-04-13) [x86_64-darwin15]
@kazu69
kazu69 / exmaple.md
Last active August 7, 2016 05:42
rpmbuild custom package example

example

create rpm hello using rpmbuild.

docker build -t fedora -f ./fedora.dockerfile .
ocker run -it fedora /bin/bash
bash-4.3# hellow
bash: hellow: command not found
bash-4.3# hello
@kazu69
kazu69 / 1.png
Last active November 26, 2015 07:48
Elasticsearch + Fluentd + Kibana with Docker and Docker-compose see http://blog.kazu69.net/2015/11/13/create-efk-with-docker/
1.png
@kazu69
kazu69 / exec.sh
Created November 24, 2015 14:58
Elasticsearch + Fluentd + Kibana with Docker and Docker-composehttps://github.com/kazu69/docker-efk/
# setup docker-machine
docker-machine create -d virtualbox dev
eval "$(docker-machine env dev)"
# docker-compose up
docker-compose up -d
Creating dockerefk_elasticsearch_1
Creating dockerefk_fluentd_1
Creating dockerefk_node_app_1
Creating dockerefk_kibana_1
@kazu69
kazu69 / 1.css
Created November 20, 2015 09:13
#modal {
-moz-opacity: .3;
opacity: .3;
background: #000;
background-image: none;
filter: alpha(opacity=30);
}
# config/application.rb
require 'active_record/connection_adapters/mysql2_adapter'
ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false
# Gemfile
group :test do
...
gem 'stackprof'
...
end