Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

ai7ch dev-aitch

💭
I may be slow to respond.
  • Marseille
Block or report user

Report or block dev-aitch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:42148552ac23155267fba320d9c741d2
/*
* This is an example build file that demonstrates how to use the build system for
* require.js.
*
* THIS BUILD FILE WILL NOT WORK. It is referencing paths that probably
* do not exist on your machine. Just use it as a guide.
*
*
* SOURCE: https://github.com/requirejs/r.js/blob/master/build/example.build.js
*
@dev-aitch
dev-aitch / blog-webpack-2.md
Created Nov 12, 2018 — forked from xjamundx/blog-webpack-2.md
From Require.js to Webpack - Part 2 (the how)
View blog-webpack-2.md

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@dev-aitch
dev-aitch / webdev_online_resources.md
Created Sep 28, 2018 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
View webdev_online_resources.md
@dev-aitch
dev-aitch / csv_to_array.php
Created Jul 27, 2018 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
View csv_to_array.php
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@dev-aitch
dev-aitch / ssh.txt
Created Jul 9, 2018 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets
View ssh.txt
# Login via SSH with password (LOCAL SERVER)
> ssh brad@192.168.1.29
# Create folder, file, install Apache (Just messing around)
mkdir test
cd test
touch hello.txt
sudo apt-get install apache2
# Generate Keys
@dev-aitch
dev-aitch / gist:550a17306db4274b4c60441ba09f73a3
Created Mar 28, 2018 — forked from darryl-snow/gist:3825198
JavaScript: Detect Orientation Change on Mobile Devices
View gist:550a17306db4274b4c60441ba09f73a3
// Listen for orientation changes
window.addEventListener("orientationchange", function() {
// Announce the new orientation number
alert(window.orientation);
}, false);
// Listen for resize changes
window.addEventListener("resize", function() {
// Get screen size (inner/outerWidth, inner/outerHeight)
@dev-aitch
dev-aitch / require_all_helper.php
Created Mar 15, 2018 — forked from pwenzel/require_all_helper.php
Recursively include all PHP files
View require_all_helper.php
<?php
/**
* Scan the api path, recursively including all PHP files
*
* @param string $dir
* @param int $depth (optional)
*/
protected function _require_all($dir, $depth=0) {
if ($depth > $this->max_scan_depth) {
You can’t perform that action at this time.