Skip to content

Instantly share code, notes, and snippets.

View semihkeskindev's full-sized avatar
🎉

Semih keskin semihkeskindev

🎉
View GitHub Profile
@semihkeskindev
semihkeskindev / mysqldump_docker_remote.sh
Created December 1, 2021 11:01
mysql export database from docker container to local
# 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
background: linear-gradient(342deg, #d50000, #c51162, #aa00ff, #00b8d4, #00c853, #aeea00, #ffd600, #ffab00, #ff6d00, #dd2c00);
background-size: 2000% 2000%;
-webkit-animation: AnimationName 22s ease infinite;
-moz-animation: AnimationName 22s ease infinite;
-o-animation: AnimationName 22s ease infinite;
animation: AnimationName 22s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:7% 0%}
    50%{background-position:94% 100%}
    100%{background-position:7% 0%}
@halillusion
halillusion / Turkish Character Uppercase-Lowercase Function.php
Created July 27, 2018 08:13
Türkçe karakter dönüşümü yapabileceğiniz PHP fonksiyon
<?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 );
@widdowquinn
widdowquinn / kali_osx_persistence_wifi.md
Last active January 28, 2024 06:32
Kali Linux Live USB with persistence and wireless on Macbook Pro

Kali Linux Bootable USB with Persistence and Wireless on OSX

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.

@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active April 11, 2024 15:26
npm vs yarn command translation cheat sheet
@simonhamp
simonhamp / AppServiceProvider.php
Last active March 26, 2024 15:56
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@roldershaw
roldershaw / imsg
Last active March 1, 2022 19:34
Send iMessages from the command line using Bash and AppleScript
#!/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
@SeanCannon
SeanCannon / array_flatten.php
Last active March 8, 2024 11:38
PHP array_flatten() function. Convert a multi-dimensional array into a single-dimensional array.
<?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)) {
@rakeshtembhurne
rakeshtembhurne / import_export_gz.sql
Created July 15, 2013 08:40
MySQL: Import and export in gzip form
// 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
@excalq
excalq / gist:2961415
Last active March 19, 2024 17:45
Javacript: Set or Update a URL/QueryString Parameter, and update URL using HTML history.replaceState()
// 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().