Skip to content

Instantly share code, notes, and snippets.


Mohammad Shahgolzadeh m2sh

View GitHub Profile
gaquino / gist:87bdf0e6e852e445c0489379d3e9732a
Last active Jul 7, 2021
MacOS (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools))
View gist:87bdf0e6e852e445c0489379d3e9732a
If you are facing an error like that on new MacOS version.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
It means that you need to install XCode command line, open a Terminal and run this command:
$ xcode-select --install
If you want to download and install Command Line tools manually, it can be downloaded from:
View snapp-total-price.js
* Open
* Login with your credentials
* Copy and pasting this code in developer tools console
* Waiting... :)
(async function () {
function sleep(ms = 0) {
return new Promise(r => setTimeout(r, ms));
View SnappTotalPriceCalculator.js
// # Usage
// Save this file and replace username and password on the last line of the file with
// your Snapp username and password then run the following commands:
// yarn init && yarn add request
// node SnappTotalPriceCalculator.js
const request = require('request');
stefancocora /
Created Sep 25, 2017
Split tunneling with openconnect - A guide on how to use openconnect to establish a vpn connection to an enterprise cisco anyconnect vpn endpoint with client side routing.


The purpose of this short howto is to show you how to:

  • use openconnect [1] to connect to an enterprise cisco anyconnect endpoint
  • whilst minimizing the amount of traffic that your route through the vpn connection

Usually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.

While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.

jsphpl / NPerGroup.php
Last active May 26, 2020 — forked from tureki/BaseModel.php
View NPerGroup.php
namespace App\Models\Traits;
use DB;
* This trait is to work around a problem where a limit on an Eloquent
* relation by default applies to all queried models in total.
PieterScheffers /
Created May 30, 2017
Build ARM docker images for Raspberry Pi with QEMU
### Choose a base image with QEMU binary
# FROM hypriot/rpi-alpine
# FROM resin/rpi-raspbian
# FROM resin/raspberry-pi-alpine-node:slim
### Register QEMU in the build agent
docker run --rm --privileged multiarch/qemu-user-static:register --reset
SanderTheDragon /
Last active Jul 15, 2021
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
curlExists=$(command -v curl)
lpimem /
Last active Mar 5, 2021
Aria2 Python Client
import json
import requests
class Aria2c:
Example :
client = Aria2c('localhost', '6800')
# print server version
SilverBut / haproxy.cfg
Last active Jul 31, 2021
[Haproxy cfg checking Socks5] Haproxy cfg to check the Socks5 connection #tags: GFW, network, haproxy, config
View haproxy.cfg
# Example configuration for a possible web application. See the
# full configuration options online.
log local2
View Dockerfile
FROM golang:1.7
# Set go bin which doesn't appear to be set already.
ENV GOBIN /go/bin
# build directories
RUN mkdir /app
RUN mkdir /go/src/app
ADD . /go/src/app
WORKDIR /go/src/app