Skip to content

Instantly share code, notes, and snippets.

View pi3r's full-sized avatar
🐒
💻

Pierre Nespo pi3r

🐒
💻
View GitHub Profile
directory structure
app/
lib/
core_ext/
hash.rb
core_ext.rb
In config/application.rb:
config.autoload_paths += %W(#{config.root.join}/lib)
@pi3r
pi3r / gist:1452659
Created December 9, 2011 18:11
bf3 bug
Unable the create a party using the button present in the COM CENTER
Windows 7 64 bit (up to date)
Google Chrome v15.0.874.121
Avast v6.0.1367(turned off)
Here are the data i send when clicking on the button:
Request URL:http://battlelog.battlefield.com/bf3/comcenter/createParty/
Request Method:POST
#
# Capistrano v2.9.0
# Bundler v 1.0.18
#
When i try to deploy i get this error (it was working before updating capistrano/bundler):
```
executing "cd /home/novagile/www/site/releases/shared && bundle install --gemfile /home/novagile/www/site/releases/shared/Gemfile --path /home/novagile/www/site/shared/bundle --deployment --quiet --without development test"
servers: ["46.38.173.116"]
@pi3r
pi3r / Ruby Linux dependencies
Created December 6, 2011 09:05
Ruby Linux dependencies
$>apt-get installl build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev
$>ruby-build RUBY_VERSION --with-readline-dir=/usr/local --with-openssl-dir=/usr/include/openssl
+1, same issue here.
My workaround is:
config.i18n.default_locale = :fr
I18n.locale = config.i18n.locale = config.i18n.default_locale
Ok it's ugly, but everything is working now! :)
@pi3r
pi3r / gist:1170312
Created August 25, 2011 09:28
.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = [email protected]:pi3r/dotfiles.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
@pi3r
pi3r / OrderValidator
Created August 2, 2011 09:20
OrderValidator
class OrderValidator < ActiveModel::Validator
@@steps = {
:step_one => [:spec, :tac, :establishment_id],
:step_one_validate => [:spec_option]
}
def validate(record)
validates_for_presence(record) if !record.current_step.blank? && steps.include?(record.current_step.to_sym)
end
th a.asc:after {
content: ' ⇣';
}
th a.desc:after {
content: ' ⇡';
}
git branch --set-upstream develop origin/develop
##MAN
--set-upstream
If specified branch does not exist yet or if --force has been given, acts exactly like --track. Otherwise sets up configuration
like --track would when creating the branch, except that where branch points to is not changed.
<las> pi3r: PCM audio data is really very, very simple
<las> pi3r: the simplest case is a mono (single channel) data buffer. to "mix" two such buffers you really do just add the values in each buffer
<pi3r> but it's going to "overflow"
<las> pi3r: interleaved data is slightly more complex, but not for mixing purposes if they are both interleaved: you still just add them
<pi3r> or a thing la that?
<pi3r> s/la/like
<las> pi3r: the overflow issue is why JACK and most other sensible APIs use floating point
<las> pi3r: for integer format samples, yes, overflow is potentially an issue, and there is no simple, trivial "always do this" rule that can be used
<pi3r> so if i have 2 totally different buffer coming from 2 different input (but with the same format)
<las> pi3r: digital audio engineering evolved a variety of different solutions, none of which are compelling. float is compelling so that is what we use