Skip to content

Instantly share code, notes, and snippets.

View ehsansabet's full-sized avatar

Ehsan Sabet ehsansabet

View GitHub Profile
@qa1
qa1 / switch to php 7.1
Last active September 23, 2020 05:06
This command will change your php version
#!/bin/bash
phpversion=$1
[ -z "$phpversion" ] && { echo "Please input php version. for example: 7.0"; exit 1;}
phpextdir=$(php -r "echo ini_get('extension_dir');")
[ ! -f "/usr/bin/php$phpversion" ] && { echo "PHP version $phpversion not found! /usr/bin/php$phpversion"; exit 1;}
sudo update-alternatives --set php /usr/bin/php$phpversion &&
sudo update-alternatives --set phar /usr/bin/phar$phpversion &&
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$phpversion &&
@mustafaturan
mustafaturan / chunk.go
Created February 5, 2019 07:00
Go / Chunk Slice
# https://play.golang.org/p/JxqibtHkuO-
func chunkBy(items []string, chunkSize int) (chunks [][]string) {
for chunkSize < len(items) {
items, chunks = items[chunkSize:], append(chunks, items[0:chunkSize:chunkSize])
}
return append(chunks, items)
}
@Pulimet
Pulimet / AdbCommands
Last active April 20, 2025 19:22
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@adamreisnz
adamreisnz / package.json
Last active April 12, 2025 09:09
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",