Skip to content

Instantly share code, notes, and snippets.

View rija's full-sized avatar

Rija Ménagé rija

View GitHub Profile
@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 / 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
@rija
rija / Yii2-logging-in-codeception.md
Created May 6, 2020 14:08
Yii2 logging in codeception

If your Yii2 app is set up with Codeception and its [Yii2][1] module for automated tests, the regular log output of the app will show in the terminal when increasing the verbosity of codecept (at least two levels: -vv).

For example, if in a backend controller action MoveAction.php I add

Yii::error("I am an error");
Yii::warning("I am a warning");
Yii::info("I am an info");
Yii::debug("I am a debug");
Yii::trace("I am a trace");
@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
@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 / 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 / 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 / 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
#!/usr/bin/env bash
start_date=$(date "+%Y-%m-%d%:%H:%M:%S")
echo "hello world"
echo $start_date
@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