SELECT t0.user_identifier c0,
t0.id c1,
t0.login_id c2,
t0.login_password c3,
t0.model c4,
t0.platform c5,
t0.uuid c6,
t0.handle_name c7,
t0.email c8,
INSERT INTO user_login_history
(
remote_address,
user_agent,
latitude,
longitude,
login_at,
user_identifier
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/var/rbenv/shims/ruby | |
@engine = Wongi::Engine.create | |
class Text | |
attr_accessor :length, :counts | |
def initialize | |
@length = 32 | |
@counts = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for index in `curl -XGET http://localhost:9200/_settings?pretty | jq "keys[]" | sed -e 's/\"//g'`;do echo localhost:9200/$index ;done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
current_revision=`git rev-parse HEAD` | |
last_release=`git for-each-ref --sort=-taggerdate --format='%(tag)' refs/tags | head -n 1` | |
echo "the last release is version: ${last_release}" | |
compare_url=`hub compare -u ${last_release}%2E%2E%2E${current_revision}` | |
echo "Check the list in github: ${compare_url}" | |
echo "\n" | |
git log --reverse --pretty=format:"%h - %an, %ar : %s" ${last_release}...${current_revision} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
brew tap cloudfoundry/tap |
On your rails project root
git clone https://gist.github.com/Jwata/4e5122fa43d719400914716955872cc2 authenticity_token_to_csrf_token
rails runner ./authenticity_token_to_csrf_token/calculate.rb 'some_authenticity_token'
=> 2PqIaqHja/+PllheC7mStH2X+y/E69LlyS5AIfd9MVs= # this is the csrf token stored in your session