create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php | |
/** | |
* Convert a multi-dimensional array into a single-dimensional array. | |
* @author Sean Cannon, LitmusBox.com | seanc@litmusbox.com | |
* @param array $array The multi-dimensional array. | |
* @return array | |
*/ | |
function array_flatten($array) { | |
if (!is_array($array)) { |
title | subtitle | author | date | source |
---|---|---|---|---|
npm vs Yarn Command Translation Cheat Sheet |
CLI commands comparison |
yarn |
February 15, 2020 |
// 2024 Update, use URLSearchParams [https://caniuse.com/urlsearchparams] | |
export function createQueryString2(name: string, value: string, searchParams: any) { | |
const params = new URLSearchParams(searchParams); | |
params.set(name, value.toLowerCase()); | |
return params.toString(); | |
} | |
// ---- Original 2012 version, when browsers really sucked ---- | |
// Explicitly save/update a url parameter using HTML5's replaceState(). |
Download the appropriate Kali Linux .iso
I used a 64 bit .iso
image, downloaded via HTTP. I downloaded the amd64 weekly version, as the pool
linux headers (needed below for installation of wireless drivers) were ahead of the stable release kernel.
Download the SHA256SUMS
and SHA256SUMS.gpg
files from the same location.
// Export database in gzip form | |
mysqldump -u user -p database | gzip > database.sql.gz | |
// Import database from gzip form | |
gunzip < database.sql.gz | mysql -u user -p database |
<?php | |
function case_converter( $keyword, $transform='lowercase' ){ | |
$low = array('a','b','c','ç','d','e','f','g','ğ','h','ı','i','j','k','l','m','n','o','ö','p','r','s','ş','t','u','ü','v','y','z','q','w','x'); | |
$upp = array('A','B','C','Ç','D','E','F','G','Ğ','H','I','İ','J','K','L','M','N','O','Ö','P','R','S','Ş','T','U','Ü','V','Y','Z','Q','W','X'); | |
if( $transform=='uppercase' OR $transform=='u' ) | |
{ | |
$keyword = str_replace( $low, $upp, $keyword ); |
# https://newbedev.com/exporting-data-from-mysql-docker-container | |
# delete first line from dump.sql file | |
docker-compose exec db mysqldump -u root -proot wordpress > dump.sql |
#!/bin/bash | |
if [ -z "$1" ] || [ -z "$2" ] ; then | |
echo "Usage: imsg [address] [message]" | |
else | |
/usr/bin/osascript -e 'tell application "Messages" | |
send "'"$2"'" to buddy "'"$1"'" of service "E:you@icloud.com" | |
end tell' | |
echo "Sent" | |
fi |