SSH Key Set Up for Multiple GitHub Accounts
A great article on how to set up and manage ssh keys for multiple github accounts/repositories
A great article on how to set up and manage ssh keys for multiple github accounts/repositories
This article covers installation of Jenkins on Ubuntu server and its usage to continuously integrate a Laravel application. Besides LAMP/LEMP stack we need to install Java, Git, Composer, and Node to successfully use Jenkins. Before starting to install this software, let’s take care of miscellaneous stuff. Miscellaneous (can skip this). Create mysql user and database….
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) VALUES (’admin’, MD5(’password’), ‘User Admin’, ‘user@admin.com’, ‘0’); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT MAX(id) FROM wp_users), ‘wp_capabilities’, ‘a:1:{s:13:"administrator";s:1:"1";}’); INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, (SELECT MAX(id) FROM wp_users), ‘wp_user_level’, ’10’);INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) VALUES…
In this article I would like to share my approach to automated deployment of a Laravel project. I have been successfully using this approach for my side projects. In this article I will share Laravel project deployment on Linux (Digital Ocean) server. In a nutshell deploying Laravel project consists of “building” it (installing composer dependencies,…
In php one can use filters with streams. Sometimes it can become handy. Let’s say you open a .csv file as a stream, but this file is tab separated. Your program can can process coma separated csvs, but not tab separated. This is a good use case for a stream filter, because it can make replacements…
Sometimes uploaded text/csv file may have non-utf8 or other funky characters using the function below. public static function processUploadedBundles($request) { $content = file_get_contents($request->file(’uploadedFile’)->getRealPath()); $lines = explode(PHP_EOL, $content); $array = []; foreach ($lines as $line) { $arrayCsv = str_getcsv($line, ","); $arrayCsv = array_map(function($value){ return preg_replace(’/[\x00-\x1F\x7F-\xFF]/’, ”, $value); }, $arrayCsv); $array[] = $arrayCsv; } return…