Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
⭐️ 🚀 🍻 🍶

kazu69 kazu69

:octocat:
⭐️ 🚀 🍻 🍶
  • Fukuoka, Japan
View GitHub Profile
@kazu69
kazu69 / main.js
Created Apr 25, 2018
Vue.js reactive object pattern
View main.js
// 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 = []
View web_component.html
<!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 Jan 29, 2018
Fibonacci algorithm in Javascript
View Readme.md

performance

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

@kazu69
kazu69 / Readme.md
Last active Sep 12, 2016
Bypassa CSP form-action XSS example
View Readme.md

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 Aug 7, 2016
rpmbuild custom package example
View exmaple.md

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 Nov 26, 2015
Elasticsearch + Fluentd + Kibana with Docker and Docker-compose see http://blog.kazu69.net/2015/11/13/create-efk-with-docker/
@kazu69
kazu69 / exec.sh
Created Nov 24, 2015
Elasticsearch + Fluentd + Kibana with Docker and Docker-composehttps://github.com/kazu69/docker-efk/
View exec.sh
# 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
View 1.css
#modal {
-moz-opacity: .3;
opacity: .3;
background: #000;
background-image: none;
filter: alpha(opacity=30);
}
View application.rb
# config/application.rb
require 'active_record/connection_adapters/mysql2_adapter'
ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false
View Gemfile
# Gemfile
group :test do
...
gem 'stackprof'
...
end