Skip to content

Instantly share code, notes, and snippets.

View aurels's full-sized avatar

Aurélien Malisart aurels

View GitHub Profile
ptolemee# npm i
> @serialport/bindings@2.0.8 install /root/mpr-6zhmaut-api/node_modules/@serialport/bindings
> prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
prebuild-install WARN install No prebuilt binaries found (target=13.0.1 runtime=node arch=x64 libc= platform=linux)
make: Entering directory '/root/mpr-6zhmaut-api/node_modules/@serialport/bindings/build'
CXX(target) Release/obj.target/bindings/src/serialport.o
In file included from ../src/./serialport.h:6,
from ../src/serialport.cpp:1:
@aurels
aurels / gist:843967
Created February 25, 2011 15:45
stream system command output to STDOUT (ruby)
IO.popen('ant run') do |io|
while (line = io.gets) do
puts line
end
end
@aurels
aurels / mapDispatchToProps.es6
Created May 22, 2017 17:51
mapDispatchToProps
const mapDispatchToProps = {
setCurrentTab: albumActions.setCurrentTab
}
const mapDispatchToProps = (dispatch) => {
return {
setCurrentTab: (tab) => {
dispatch(albumActions.setCurrentTab(tab))
}
}
@aurels
aurels / uninstall-gems.sh
Created April 27, 2017 08:36
Uninstalling all gems
# http://stackoverflow.com/questions/15100496/uninstalling-all-gems-ruby-2-0-0
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
mainApp.directive('unique', function($http) {
return {
restrict: 'A',
require: 'ngModel',
scope: {
ownId: '@uniqueOwnId'
},
link: function(scope, elem, attr, ctrl) {
git push origin sprint6
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 1.54 KiB, done.
Total 10 (delta 7), reused 0 (delta 0)
remote: bb/acl: phonoid is allowed. accepted payload.
remote: ERROR 2012-09-19 10:22:26,210 manager 2130 140368828270336 'DictAttribute' object has no attribute 'iterkeys'
remote: Traceback (most recent call last):
remote: File "/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/raven/utils/serializer/manager.py", line 68, in transform
@aurels
aurels / gist:3136024
Created July 18, 2012 12:47
Install PHP on OSX
@aurels
aurels / gist:3136032
Created July 18, 2012 12:49
Change the default location for screenshots on OSX
  • mkdir /Full/Path/To/Folder.
  • defaults write com.apple.screencapture location /Full/Path/To/Folder.
  • Log out and log back in.

Note: You have to put in the path properly. Using ~ to indicate your home folder will not work. The path must be entered starting from the root of the hard drive. For example, if you wanted to save them to a secondary partition, your path would start with /Volumes/SecondPartition/.

Source :

http://hints.macworld.com/article.php?story=20050824073301844

@aurels
aurels / gist:3136015
Created July 18, 2012 12:46
Install Postgres on OSX
$ brew install postgres
+ instructions à la fin de l'install
http://samsoff.es/posts/running-rails-local-development-with-nginx-postgres-and-passenger-with-homebrew
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<?php
$url = "https://rendez-vous-digital.pro/api/public/albums.json?api_key=MY_API_KEY_HERE&artists_scope=all&page=1&artists=281";
$raw_data = file_get_contents($url);
$data = json_decode($raw_data);
?>