Skip to content

Instantly share code, notes, and snippets.

View fdv's full-sized avatar
🚀
Taking over the world

Fred de Villamil fdv

🚀
Taking over the world
View GitHub Profile
@fdv
fdv / gist:946f02260beee71e5229
Created May 2, 2015 12:25
Had this mail from a recruiter. Couldn't answer anything but LOL.
Hello,
I'm contacting you to offer you a uniq job opportunity. My client is a world class company looking for a R&D operations cloud engineer.
On an international perimeter, the collaborator will join a team of R&D experts that faces technical challenges and has to deliver innovations (WTF???)
I'm looking for someone with a first experience or a technical leader with dual development skills (Example: Python + Java) in a SOAP/REST environment and architecture / automation system deployment in the CLOUD who wants to work in a R&D team.
About the role:
- Very interesting salary
C'est l'histoire d'un gamin de 6 ans qui décide que les pauvres, les handicapés, les moches et les imbéciles ne devraient pas avoir le droit de se reproduire.
Et tu le suis tout au long de sa vie durant laquelle il va peu à peu faire accepter cette idée au monde entier (il monte un journal, en rachète, devient un magnat de la presse etc...) et au lieu de faire passer des lois, c'est la pression de la société à travers la manipulation des média (publicité + campagnes + reportages) qui transforme le monde en haras géant.
Et à la fin, il apprend qu'il est affecté d'une maladie génétique qui fait que ses enfants doivent se faire stériliser.
@fdv
fdv / sslvhost.conf
Created October 15, 2014 15:16
nginx SSL configuration for a A / A+ on ssl labs (depends on your key using SHA1 or not)
# nginx SSL configuration for a A / A+ on ssl labs (depends on your key using SHA1 or not)
ssl on;
ssl_certificate /usr/local/etc/nginx/ssl/cert.pem;
ssl_certificate_key /usr/local/etc/nginx/ssl/key.key;
ssl_dhparam /usr/local/etc/nginx/ssl/dh4096.pem;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'AES256+EECDH:AES256+EDH';
Premier coup :
FROM ubuntu:14.04
RUN echo build $(date)
RUN apt-get update
RUN apt-get install nagios-nrpre-server
RUN apt-get upgrade
CMD nagios-nrpe-server
Tu build ton container nrpe, et ensuite :
@fdv
fdv / main.yml
Last active August 29, 2015 14:06
Quick Ansible role to upgrade vulnerable Bash for the laziest
- name: Update apt DB
tags: fix_bash
sudo: yes
apt: update_cache=yes
- name: Update base packages
tags: fix_bash
sudo: yes
apt: pkg=bash state=latest
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'
# 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
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
@fdv
fdv / word-frequency-nuplet-1.rb
Last active August 29, 2015 14:03
Quick and dirty way to find nuplets word frequency in a series of texts
# 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
- 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 }}