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/bash | |
# This script basically find duplicateds based on titles, keep the first one and delete the other ones. | |
# /!\ Be careful if you have different IDs that potentially have the same title. | |
# You need 1password client and jq to make it work | |
json_data=$(op item list --format json) | |
duplicates=$(echo "$json_data" | jq -r '.[] | .title' | sort | uniq -d) | |
while read -r title; do |
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
{ | |
"_json"=>[ | |
{ | |
"farm"=>{ | |
"uid"=>"04a814ed-7041-4b04-a51b-c6bd41c593ca", | |
"name"=>"demo API dev", | |
"farm_code"=>"30247504101420" | |
}, | |
"indicator"=>{ | |
"uid"=>"970d9d0b-37d1-4602-a687-2b8ce6b621e0", |
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
#compdef docker-machine | |
# ------------------------------------------------------------------------------ | |
# Description | |
# ----------- | |
# | |
# Completion script for Docker Machine (http://docs.docker.com/machine/). | |
# Adapted from boot2docker completion by hhatto (https://github.com/hhatto) | |
# and docker completion by @aeonazaan and @bobmaerten. | |
# | |
# ------------------------------------------------------------------------------ |
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
gem 'devise' | |
gem 'omniauth' | |
gem 'omniauth-facebook' | |
gem 'omniauth-google-oauth2' | |
gem 'omniauth-windowslive' |
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
require 'benchmark' | |
n = 5000000 | |
class A | |
def initialize(attribute) | |
@attribute = attribute | |
end |
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
[1] pry(main)> str = "Candy bar" | |
=> "Candy bar" | |
[2] pry(main)> /(?<word>\w+)/ =~ str | |
=> 0 | |
[3] pry(main)> word | |
=> "Candy" | |
[4] pry(main)> str =~ /(?<w>\w+)/ | |
=> 0 | |
[5] pry(main)> w | |
NameError: undefined local variable or method `w' for main:Object |
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
i = "foo" | |
for i in 1..5 do | |
puts i | |
j = "bar" | |
end | |
i # => 5 | |
j # => "bar" | |
i = "foo" | |
(1..5).each do |i| |
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
Last 10 log lines: | |
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace | |
SOLIBS = | |
compiling main.c | |
In file included from /usr/include/string.h:190, | |
from ./include/ruby/ruby.h:48, | |
from ./include/ruby.h:32, | |
from main.c:13: | |
/usr/include/secure/_string.h: In function ‘__inline_stpncpy_chk’: | |
/usr/include/secure/_string.h:118: error: implicit declaration of function ‘__builtin___stpncpy_chk’ |
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
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info | |
Referenced from: /Users/fuse/Dropbox/code/ladw/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle | |
Expected in: flat namespace | |
dyld: Symbol not found: _mysql_get_client_info | |
Referenced from: /Users/fuse/Dropbox/code/ladw/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle | |
Expected in: flat namespace |
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
upstream fake { | |
server unix:/www/fake/shared/sockets/unicorn.sock; | |
} |
NewerOlder