Skip to content

Instantly share code, notes, and snippets.

View arbaouimehdi's full-sized avatar
🎯
focusing

Arbaoui Mehdi arbaouimehdi

🎯
focusing
View GitHub Profile
@arbaouimehdi
arbaouimehdi / docker-commands.md
Last active July 30, 2021 23:35
Docker Cheat Sheet

create a container but does not start it

docker create

allows the container to be renamed

docker rename

creates and starts a container in one operation

@arbaouimehdi
arbaouimehdi / fix-wordpress-files-permissions.sh
Last active October 3, 2017 13:35
script configures WordPress file permissions based on recommendations from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
### Rails template
*.rbc
capybara-*.html
.rspec
/log
/tmp
/db/*.sqlite3
/db/*.sqlite3-journal
/public/system
/coverage/
@arbaouimehdi
arbaouimehdi / Gemfile
Last active October 18, 2017 18:34
Gemfile
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Rails
gem 'rails', '~> 5.1.3'
@arbaouimehdi
arbaouimehdi / wordpress.nginx
Created October 27, 2017 11:13 — forked from LeCoupa/wordpress.nginx
WordPress - Nginx Configuration File (with SSL)
##
# @server studio
# @host hackisition.com
# @desc nginx host rules
# @author Julien Le Coupanec <[email protected]>
##
# HTTP Server
server {
listen 80;
@arbaouimehdi
arbaouimehdi / backup-github.sh
Created November 4, 2017 14:30 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
@arbaouimehdi
arbaouimehdi / php.ini
Last active March 16, 2020 18:47
php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@arbaouimehdi
arbaouimehdi / breadcrumbs-functions.php
Created December 26, 2017 12:33 — forked from tinotriste/breadcrumbs-functions.php
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@arbaouimehdi
arbaouimehdi / .eslintrc.js
Created June 30, 2018 20:06 — forked from adrianhall/.eslintrc.js
A sample .eslintrc file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@arbaouimehdi
arbaouimehdi / gist:f8cc9402e89bdb91d242eac21d517198
Created July 6, 2018 21:18 — forked from olivierlacan/gist:4062929
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.