Skip to content

Instantly share code, notes, and snippets.

View rija's full-sized avatar

Rija Ménagé rija

View GitHub Profile
@rija
rija / puppet_macosx_rvm
Created February 12, 2012 22:20
Problem loading Puppet libraries on Mac OS X
got these errors on Mac OS X Lion and Puppet 2.7.10:
/usr/bin/puppet:3:in `require': no such file to load -- puppet/util/command_line (LoadError)
from /usr/bin/puppet:3
/usr/sbin/puppetd:3:in `require': no such file to load -- puppet/application/agent (LoadError)
from /usr/sbin/puppetd:3
@rija
rija / install_puppet_mac.sh
Created February 23, 2012 23:04
Installing Puppet on Mac OS X
#!/usr/bin/env bash
set -o errtrace
set -o errexit
facter_version=$1
puppet_version=$2
target_volume=$3
#!/usr/bin/env bash
start_date=$(date "+%Y-%m-%d%:%H:%M:%S")
echo "hello world"
echo $start_date
@rija
rija / dm-do.md
Last active August 29, 2015 14:27
getting started with docker-machine and Digital Ocean

Going through the tutorial

$ dm -D create --driver digitalocean --digitalocean-access-token  $DO_TOKEN  --digitalocean-region "sgp1"  staging
Creating SSH key...
Creating Digital Ocean droplet...
Created droplet ID 6514054, IP address 128.199.153.11
Error getting machine state: Get https://api.digitalocean.com/v2/droplets/6514054: net/http: TLS handshake timeout
Error getting machine state: Get https://api.digitalocean.com/v2/droplets/6514054: net/http: TLS handshake timeout
Error getting machine state: Get https://api.digitalocean.com/v2/droplets/6514054: net/http: TLS handshake timeout
@rija
rija / redhat.rb.conflict.md
Last active January 9, 2018 11:01
two (three) ways of fixing the existing postgresql package problem in Chef

The conflict

both code try to fix the same problem

# To do: exclude Centos 6 postgres packages
bash 'Add postgres package repositories' do
		user 'root'
		cwd '/tmp'
    code <<-EOH
@rija
rija / gihub-fork-update-workflow.md
Last active January 31, 2018 12:56
github fork update workflow

Stage 0: git setup

workflow assumptions

  • The upstream project has a develop branch from which feature branch are created.
  • Feature branches can be long lived
  • I have not commit right on any branch on the upstream project
  • I forked the upstream form Github web interface
  • I have clone my fork on my local development envirnment
  • To submit my changes I create a Pull Request for the upstream develop branch.
@rija
rija / debug_github.md
Created March 25, 2018 05:09
github TLS access

Fix for the error during vagrant provision where git command failed to connect with github.com

the error message says:

```
error:  while accessing https://github.com/yiisoft/yii.git/info/refs

fatal: HTTP request failed
```
@rija
rija / xhprof-xhgui-nginx-php-fpm-docker.md
Last active October 18, 2021 10:14
Configuring xhprof and xhgui for a multi-containers setup (nginx/php-fpm)
@rija
rija / video_to_audio.sh
Created November 25, 2019 06:42
Batch convert mp4 to m4a
#!/bin/bash
destination=".."
source_folder="Music"
for i in $source_folder/*.mp4;
do name=`echo "$i" | cut -d'.' -f1`
echo "$name"
echo "ffmpeg -i $i -c:a aac -c:b 128k -vn -f mp4 $destination/$name.m4a"
@rija
rija / vuejs-karma-jasmine-web.md
Last active December 15, 2019 05:16
scratch notes for setting karma and jasmine for testing vuejs app running in html page (no SFC, no Node, no pipeline)
$ pwd
/Users/rija/Documents/projects/vuejs-karma-jasmine-web
$ tree .
.
├── src
│   ├── css
│   ├── html
│   │   └── index.html
│   └── js