Skip to content

Instantly share code, notes, and snippets.

View ZogStriP's full-sized avatar

Régis Hanol ZogStriP

View GitHub Profile
@ZogStriP
ZogStriP / currentcost.py
Last active December 14, 2015 04:59
script used to publish currentcosts' temperature and wattage data to cosm through a raspberry pi
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import serial
import re
from datetime import datetime
import requests
temp = re.compile('<tmpr>(.+)</tmpr>')
@ZogStriP
ZogStriP / ember.js-with-google-maps.html
Created May 31, 2013 13:32
How to use Google Maps with Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.3/ember.js"></script>
<script src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
</head>
<body>
<script>
@ZogStriP
ZogStriP / ember.js-planning.html
Last active December 18, 2015 14:19
Planning example in Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.4/handlebars.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.4/ember.min.js"></script>
</head>
<body>
<script type="text/x-handlebars">
{{outlet}}
@ZogStriP
ZogStriP / ember.js-star-rating.html
Last active December 18, 2015 18:09
Star ratings example in Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.4/handlebars.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.4/ember.min.js"></script>
</head>
<style>
.rating {
unicode-bidi: bidi-override;
~/Poetry/fast_stack (master) → ber compile
mkdir -p lib/fast_stack
mkdir -p tmp/x86_64-darwin12.3.0/fast_stack/2.0.0
cd tmp/x86_64-darwin12.3.0/fast_stack/2.0.0
/Users/regis/.rvm/rubies/ruby-2.0.0-p195/bin/ruby -I. ../../../../ext/fast_stack/extconf.rb
creating Makefile
cd -
cd tmp/x86_64-darwin12.3.0/fast_stack/2.0.0
make
compiling ../../../../ext/fast_stack/fast_stack.c
1) ListController indexes allows users to filter on a set of topic ids
Failure/Error: parsed["topic_list"]["topics"].length.should == 1
expected: 1
got: 0 (using ==)
# ./spec/controllers/list_controller_spec.rb:35:in `block (3 levels) in <top (required)>'
2) Site omits categories users can not write to from the category list
Failure/Error: Site.new(Guardian.new(user)).categories.count.should == 2
expected: 2
got: 1 (using ==)
Failures:
1) PostMover move_posts successfully moved to a new topic works correctly
Failure/Error: p2.topic_links.first.topic_id.should == new_topic.id
NoMethodError:
undefined method `topic_id' for nil:NilClass
# ./spec/models/post_mover_spec.rb:82:in `block (5 levels) in <top (required)>'
2) TopicLink external links works
Failure/Error: @topic.topic_links.count.should == 4
[2014-02-13 01:05:01] EXCEPTION: Tried to use a connection from a child process without reconnecting. You need to reconnect to Redis after forking.
[2014-02-13 01:05:01] /home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis/client.rb:287:in `ensure_connected'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis/client.rb:179:in `block in process'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis/client.rb:258:in `logging'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis/client.rb:178:in `process'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis/client.rb:84:in `call'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis.rb:675:in `block in set'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis.rb:36:in `block in synchronize'
/home/regis/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/regis/.rvm/gems/ruby-2.1.0/gems/redis-3.0.6/lib/redis.rb:36:in `synchronize'

Keybase proof

I hereby claim:

  • I am zogstrip on github.
  • I am zogstrip (https://keybase.io/zogstrip) on keybase.
  • I have a public key ASDIGmEupQFtHCwDh0Pnrx_XTkjSBpel_K4Cjz0CS37YjQo

To claim this, I am signing this object:

@ZogStriP
ZogStriP / pro-finder.rb
Last active August 29, 2015 14:21
Startup Weekend Hack
require "mechanize"
BASE_URL = "http://www.societe.com"
SEARCH_URL = "#{BASE_URL}/cgi-bin/liste?ape={APE}&dep={DEP}"
APE = %W{
4120A 4120B
4311Z 4312A 4312B 4313Z 4321A 4321B 4322A 4322B 4329A 4329B 4331Z 4332A 4332B 4332C 4333Z 4334Z 4339Z 4391A 4391B 4399A 4399B 4399C 4399D 4399E
}