This file contains hidden or 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
# Seems you have 2 solutions left: | |
# - either you trash the whole index and reindex. Good luck, have fun | |
# - or you manually reallocate the whole thing | |
# | |
# Guess what I'll pick up | |
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ | |
"commands": [ | |
{ | |
"allocate": { |
This file contains hidden or 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
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation": true}}' | |
/etc/init.d/elasticsearch restart | |
curl -XPUT localhost:9200/_cluster/settings -d '{"transient":{"cluster.routing.allocation.disable_allocation": false}}' |
This file contains hidden or 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
# Easier way to install FreeBSD 10 on a Dedibox using the rescue system | |
# - no vnc | |
# - no qemu network unable to join the host network issue | |
sudo su - | |
aptitude update | |
aptitude install | |
wget ftp://ftp.free.fr/mirrors/ftp.freebsd.org/ISO-IMAGES-amd64/10.0/FreeBSD-10.0-RELEASE-amd64-disc1.iso | |
sudo qemu-system-x86_64 -hda /dev/sda -cdrom ./FreeBSD-10.0-RELEASE-amd64-disc1.iso -display curses -boot d |
This file contains hidden or 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
linking shared-object nokogiri/nokogiri.so | |
/usr/bin/ld: /usr/local/lib/ruby/gems/1.9/gems/nokogiri-1.6.1/ports/libxslt/1.1.26/lib/libexslt.a(common.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC | |
/usr/local/lib/ruby/gems/1.9/gems/nokogiri-1.6.1/ports/libxslt/1.1.26/lib/libexslt.a: could not read symbols: Bad value | |
cc: error: linker command failed with exit code 1 (use -v to see invocation) | |
*** Error code 1 | |
Stop. | |
make: stopped in /usr/local/lib/ruby/gems/1.9/gems/nokogiri-1.6.1/ext/nokogiri |
This file contains hidden or 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
document.getElementbyId('boobs').innerHTML = document.head.innerHTML; | |
document.head.innerHTML = ''; |
This file contains hidden or 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
- name: create the {{ launch_config }} launch config | |
local_action: > | |
ec2_lc | |
aws_access_key={{ ec2_access_key }} | |
aws_secret_key={{ ec2_secret_key }} | |
region={{ region }} | |
name={{ launch_config }} | |
image_id={{ image_id }} | |
key_name={{ keypair }} | |
security_groups={{ group }} |
This file contains hidden or 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
# coding utf-8 | |
=begin | |
Working on y blog internal linking, I started to think about a better than just tags way to find similarities between texts. | |
I wanted to find 2 and 3 words similarities betwen my posts, so I wrote that quick and dirty script to do it. I'm then comparing the token appearing 2 to 5 times with the tags used in the article to build my "related posts" link. | |
Results are not great so far, because I'm working with only a 1200 articles with very unique content. Next step is to include a list of synonymouses to get better results. | |
=end |
This file contains hidden or 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
dig -t ns @ns1.7el.net t37.net | |
; <<>> DiG 9.8.3-P1 <<>> -t ns @ns1.7el.net t37.net | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33441 | |
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2 | |
;; WARNING: recursion requested but not available |
This file contains hidden or 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
# In the main vhost config | |
proxy_cache_path /var/cache/nginx levels=1:2 | |
keys_zone=microcache:5m max_size=1000m; | |
# In the location / | |
# Init cache bypass | |
set $no_cache ""; | |
# If non GET/HEAD, don't cache & mark user as uncacheable for 1 second via cookie |
This file contains hidden or 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
NoMethodError (undefined method `with_scope' for #<Class:0x0000001ef7f3c8>): | |
app/models/trigger.rb:37:in `remove' | |
app/models/article/states.rb:145:in `published_at=' | |
lib/stateful.rb:65:in `published_at=' | |
app/controllers/admin/content_controller.rb:157:in `update_article_attributes' | |
app/controllers/admin/content_controller.rb:70:in `update' |