Skip to content

Instantly share code, notes, and snippets.

View nicolasblanco's full-sized avatar
🎯
Focusing

Nicolas Blanco nicolasblanco

🎯
Focusing
View GitHub Profile
@nicolasblanco
nicolasblanco / gist:5475340
Last active December 16, 2015 18:09
Liste de boutiques online et physiques de vêtements pour homme : priorité aux vêtements de bonne qualité, originaux, de créateurs français/européens et fabriqués en Europe.

Liste de boutiques online et physiques de vêtements pour homme : priorité aux vêtements de bonne qualité, originaux, de créateurs français/européens et fabriqués en Europe.

  • La Comédie Humaine

http://www.lacomediehumaine.com/shop/fr/

Chemises Made in France a cols amovibles, chinos, vestes...

  • Balibaris
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
@nicolasblanco
nicolasblanco / gist:5026135
Last active December 14, 2015 04:09
Fix for Ruby 2.0 Bundler OpenSSL certificate exception (in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError))
sudo wget http://curl.haxx.se/ca/cacert.pem -O /usr/local/etc/openssl/certs/cert.pem
echo "export SSL_CERT_FILE=/usr/local/etc/openssl/certs/cert.pem" >> ~/.bash_profile
source ~/.bash_profile
@nicolasblanco
nicolasblanco / gist:5026078
Created February 24, 2013 22:46
Jenkins conf for rbenv
Jenkins system conf :
PATH
$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH
(15:01:32 ftv.pgep.wwwint-01) webadmin /space/www/pgep/data/current $ curl -X GET "http://localhost:9200/pgep-integ_broadcasts/broadcast/_search?pretty=true" -d '{"filter":{"bool":{"must_not":[{"range":{"ends_at":{"lt":"2013-02-17"}}},{"range":{"starts_at":{"gt":"2013-02-20"}}}]}}}'
{
"took" : 5,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
javascript:
window.angular_init = { format_id: "#{f.object.program_format_id}", genre_id: "#{f.object.genre_id}", country_id: "#{f.object.country_id}", award_ids: #{f.object.awards.map { |a| { _id: a._id } }.to_json.html_safe} };
div ng-controller="AwardCtrl"
.control-group
label Palmarès
.controls
div ng-repeat="program_award in program_awards"
div ng-switch="" on="!!program_award.deleted"
curl -X GET "http://localhost:9200/pgep-development_broadcasts/broadcast/_search?pretty=true" -d '{"query":{"match_all":{}},"fields":["_id", "title"]}'
{
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
/ Form with nested has_and_belongs_to childs (with Add / Edit / Remove of childs) in pure AngularJS
/
/ Site <--> SiteSocialNetwork (url) <--> SocialNetwork (name)
/
/ SocialNetwork (field :name)
/ Site embeds_many :site_social_networks
/ SiteSocialNetwork (field :url) belongs_to :site_network
:javascript
function SocialNetworkCtrl($scope) {
@nicolasblanco
nicolasblanco / gist:4578853
Last active May 21, 2019 07:15
Installer Cyanogenmod 10.1 sur Nexus 4 (OS X)
  1. Télécharger Android SDK OS X : http://developer.android.com/sdk/index.html

Télécharger ClockWorkMod Touch : http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.2.3-mako.img

Télécharger la dernière Cynogenmod 10.1 nightly sur : http://get.cm/?device=mako

Télécharger les Google Apps : http://goo.im/gapps/gapps-jb-20121212-signed.zip

Utiliser un outil de transfert pour transférer les deux derniers ZIP (uniquement CM+GApps, pas besoin de transférer ClockModWork) dans la SDCard interne du téléphone dans un sous-dossier quelconque.

1) Article.search_with_pagination given some datas returns only quantity of article ask in per_page
Failure/Error: Article.search_with_pagination({}, {page: nil, per_page: 1}).should eq([article])
expected: [#<Article id: 1931, type: "Article", title: "A big article", author: nil, body: "A content with several data", extended: "extended content for fun", excerpt: nil, created_at: "2013-01-18 20:05:07", updated_at: "2013-01-18 20:05:07", user_id: 2522, permalink: "a-big-article", guid: "deadbeef527", text_filter_id: nil, whiteboard: nil, name: nil, published: true, allow_pings: true, allow_comments: true, published_at: "2005-01-01 02:00:00", state: "published", parent_id: nil, settings: {}, post_type: "read">]
got: [#<Article id: 1932, type: "Article", title: "A big article", author: nil, body: "A content with several data", extended: "extended content for fun", excerpt: nil, created_at: "2013-01-18 20:05:07", updated_at: "2013-01-18 20:05:07", user_id: 2523, permalink: "a-big