Skip to content

Instantly share code, notes, and snippets.

View julienbourdeau's full-sized avatar
🌎
San Franscico until Friday 28th

Julien Bourdeau julienbourdeau

🌎
San Franscico until Friday 28th
View GitHub Profile
@julienbourdeau
julienbourdeau / generate_self_signed_certification.md
Created September 19, 2024 09:20 — forked from taoyuan/generate_self_signed_certification.md
Generation of a Self Signed Certificate

Generation of a Self Signed Certificate

Generation of a self-signed SSL certificate involves a simple 3-step procedure:

STEP 1: Create the server private key

openssl genrsa -out cert.key 2048

STEP 2: Create the certificate signing request (CSR)

openssl req -new -key cert.key -out cert.csr
@julienbourdeau
julienbourdeau / DNS prefetching
Created January 13, 2019 08:37
Common Prefetch Links
<!-- Amazon S3 -->
<link rel="dns-prefetch" href="//s3.amazonaws.com">
<!-- Google CDN -->
<link rel="dns-prefetch" href="//ajax.googleapis.com">
<!-- Microsoft CDN -->
<link rel="dns-prefetch" href="//ajax.microsoft.com">
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com">
@julienbourdeau
julienbourdeau / install.bash
Created May 21, 2018 11:20 — forked from val-bubbleflat/install.bash
Install V8Js on Laravel Forge
sudo add-apt-repository ppa:pinepain/libv8-5.2
sudo apt-get update
sudo apt-get install libv8-5.2
sudo pecl install v8js
sudo su
echo "extension=v8js.so" >> /etc/php/7.1/fpm/php.ini
echo "extension=v8js.so" >> /etc/php/7.1/cli/php.ini
exit
sudo service nginx restart && sudo service php7.1-fpm restart

I recently got a new Macbook Pro and wanted to document how I setup my PHP environment. I like full control of how PHP is built and I usually build it from source. I do this because I often add custom extensions and modules not found in the common PHP OSX installers. If your looking for a easier method than building from source try https://php-osx.liip.ch/.

NOTE: This post assumes you are running a fresh install of MacOS Sierra 10.12.16 with System Integrity Protection disabled. If you don't know how to disable it just boot into recovery mode and open a terminal and type csrutil disable, or google search it :) This post also assumes you are using Zsh instead of Bash shell. If you are using Bash you can replace anytime you see ~/.zshrc with ~/.bashrc.

First lets get some of the prerequisites. Start by grabbing the command line tools neccessary:

xcode-select --install
@julienbourdeau
julienbourdeau / windows_keys_like_osx.ahk
Created November 3, 2017 10:18 — forked from levelsio/windows_keys_like_osx.ahk
Make Bootcamp Windows keys act like OSX
; Make Bootcamp Windows keys act like OSX
; by @levelsio
;
; 2017-11-02
;
; Licensed as GPL
;
; Use autohotkey.com to load this file on Windows
;
; This fixes Cmd+Tab to work like Alt+Tab, also keys like Cmd+C as Ctrl+C etc., Cmd+Q to Alt-F4
@julienbourdeau
julienbourdeau / regenerate-images.php
Created August 29, 2016 14:12 — forked from matchaxnb/regenerate-images.php
Regenerate images in Prestashop from command line
<?php
define('_PS_ROOT_DIR_', '/path/to/prestashop/root');
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.'admin_folder');
require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
require(_PS_ADMIN_DIR_.'/functions.php');
class Employee2 extends EmployeeCore
{
public function isSuperAdmin()
@julienbourdeau
julienbourdeau / pr.md
Last active August 16, 2016 16:07 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:PrestaShop/PrestaShop.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@julienbourdeau
julienbourdeau / byte-sizetuts.md
Created March 9, 2016 14:25 — forked from honkskillet/byte-sizetuts.md
A series of golang tutorials with youtube videos.
export PS1='\[\e[0;36m\][\A] \u@\h:\[\e[0m\e[0;32m\]\W\[\e[1;33m\]$(__git_ps1 " (%s)")\[\e[0;37m\] \$\[\e[0m\]'
[_USER_]
listen = /var/run/php5-fpm._USER_.sock
listen.owner = _USER_
listen.group = _USER_
listen.mode = 0666
user = _USER_
group = _USER_
pm = dynamic
pm.max_children = 15
pm.start_servers = 3