Skip to content

Instantly share code, notes, and snippets.

View pmirshad's full-sized avatar

Irshad Pananilath pmirshad

  • Kozhikode, Kerala
View GitHub Profile
@phhusson
phhusson / AppsOverADB.kt
Created February 2, 2021 21:33
Remote control apps running on a smartphone
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@m-radzikowski
m-radzikowski / script-template.sh
Last active July 13, 2024 13:20
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
#! /bin/bash
usage() {
echo "measureTraffic.sh <targetIP>"
}
if [ -z "$1" ]; then
usage
exit 1
fi
@andyrbell
andyrbell / scanner.sh
Last active July 9, 2024 16:43
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@kushal
kushal / main.go
Last active November 27, 2016 09:34
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"strconv"
@kushal
kushal / review.sh
Last active January 25, 2021 07:23
#!/bin/bash
set -e
function ynprompt {
read -n 1 -r -p "KEEP GOING? [Y/n] " response
if [[ $response =~ ^([nN])$ ]]
then
exit
fi
@sebastianwebber
sebastianwebber / README.md
Last active June 29, 2024 13:59
Compilation of the Uber Facts on PostgreSQL to MySQL Migration

Uber facts

Original posts/information

Key points

  • ~50GB MySQL Application
  • Main motivation: PostGis
  • Migration made with a custom tool(xml2pgcopy) and mysqldump on 45min
@doublerebel
doublerebel / your_test.go
Last active March 11, 2024 11:34 — forked from epelc/your_test.go
Use pflags and regular `go test` flags in your tests
package yourpackage
import (
goflag "flag"
"fmt"
"os"
"strings"
"testing"
flag "github.com/spf13/pflag"
@epelc
epelc / your_test.go
Created February 10, 2016 03:56
Use pflags and regular `go test` flags in your tests
package yourpackage
import (
goflag "flag"
"fmt"
"os"
"strings"
"testing"
flag "github.com/spf13/pflag"
@aggrolite
aggrolite / redditbot.md
Last active January 6, 2022 13:44
Writing a reddit bot with Go and OAuth2