# installed by winget
winget install PowerShell-Preview
winget install git
git config --global user.name "Christophe Dervieux"
git config --global user.email christophe.dervieux@gmail.com
winget install rstudio
winget install vscode
winget install -e R
winget install Github.GithubDesktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tmux source-file .tmux.conf | |
# Or reload the tmux config by `ctrl+b r` | |
bind r source-file ~/.tmux.conf | |
# If you don't use ELinks browser in Win terminal comment out the default-terminal | |
# The default is 'screen' | |
# set -g default-terminal "screen-256color" | |
set -g default-terminal "xterm-256color" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim color file | |
" Maintainer: morumo | |
" Last Change: 2014/03/09 | |
set bg=dark | |
hi clear | |
if exists("syntax_on") | |
syntax reset | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1='\[\033[32m$(pwd | sed -e 's!/d/home!-!')\033[36m $(__git_ps1 "%s")\033[0m\] | |
$ ' | |
if [[ $(git rev-parse --git-dir 2> /dev/null) && -z "$GIT_MOTD" ]]; then | |
echo -e "\e[00;32m- \e[01;33mWelcome $(id -u -n)" | |
echo -e "\e[00;32m- \e[01;32mGIT BRANCH \e[00;32m-----------------------------------------------------\e[00m" | |
git branch | |
echo -e "\e[00;32m- \e[01;32mGIT STATUS \e[00;32m-----------------------------------------------------\e[00m" | |
git status | |
echo -e "\e[00;32m------------------------------------------------------------------\e[00m" |
in ~/.bash_profile
:
alias npp='~/npp'
in ~/npp
:
#!/bin/sh
exec d:/utils/Notepad++/notepad++.exe "$@" &
Download http://pear.phpunit.de/get/phpunit.phar
Edit ~/.bash_profile:
alias php="d:/online/xampp/php/php.exe"
alias phpunit="php d:/online/xampp/php/phpunit.phar"
In any directory: phpunit test.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://terenceyim.wordpress.com/2009/01/09/adding-ping-function-to-pdo/ | |
class NPDO { | |
private $pdo; | |
private $params; | |
public function __construct() { | |
$this->params = func_get_args(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class db extends PDO { | |
public function fetch_all( $query, $parameters=array() ) { | |
$read_stmt = $this->prepare_and_execute($query, $parameters); | |
$fetched_rows = $read_stmt->fetchAll(PDO::FETCH_CLASS); | |
$read_stmt->closeCursor(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_end_clean(); | |
header("Connection: close"); | |
ignore_user_abort(); // optional | |
ob_start(); | |
echo ('Text the user will see'); | |
$size = ob_get_length(); | |
header("Content-Length: $size"); | |
ob_end_flush(); // Strange behaviour, will not work | |
flush(); // Unless both are called ! |
NewerOlder