Skip to content

Instantly share code, notes, and snippets.

View abdul's full-sized avatar
🎯
Focusing

Abdul Qabiz abdul

🎯
Focusing
View GitHub Profile
@abdul
abdul / Kubernetes Hello World App.md
Created July 30, 2022 12:24 — forked from initcron/Kubernetes Hello World App.md
Creating and Deploying a Sample App with Kubernetes

Create Dockerfile for sample Node App

    mkdir dev

    cd dev

    cat > Dockerfile
    
FROM node:4.4
@abdul
abdul / killbutmakeitlooklikeanaccident.sh
Created July 24, 2022 09:17 — forked from moyix/killbutmakeitlooklikeanaccident.sh
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@abdul
abdul / dyson-api-test.sh
Created August 6, 2020 14:16 — forked from deftdawg/dyson-api-test.sh
Simple shell script to Dyson API using curl and jq
#!/usr/bin/env bash
# Deftdawg's Dyson API test script
# Requires curl and jq
DYSON_SERVER="appapi.cp.dyson.com"
DYSON_EMAIL=${1}
DYSON_PASSWORD=${2}
if [ -z "${DYSON_EMAIL}" ] || [ -z "${DYSON_PASSWORD}" ]; then
@abdul
abdul / webstoemp-gulpfile.js
Created May 30, 2020 16:36 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@abdul
abdul / animatedScrollTo.js
Created May 29, 2020 11:57 — forked from joshbeckman/animatedScrollTo.js
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@abdul
abdul / install_pkg.sh
Created May 28, 2020 15:03
Detect different OS and Distros and run package install commands
function install()
{
echo "$1"
package="$1"
case `uname` in
Linux )
LINUX=1
if type "yum" > /dev/null; then
# install foobar here
rpm -qa | grep -qw "$package" || yum install "$package" -y
@abdul
abdul / fix-symlinks.sh
Created May 28, 2020 15:01
Convert absolute to relative symlinks -- recursively in a directory
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@abdul
abdul / README.md
Created May 26, 2020 19:28 — forked from harshavardhana/README.md
REX-Ray with Minio

Getting Started

The following command will install the latest version of REX-Ray to /usr/bin/rexray on Linux systems:

$ sudo apt install s3fs
$ curl -sSL https://dl.bintray.com/emccode/rexray/install | sh

Depending on the Linux distribution REX-Ray will be registered as either a SystemD or SystemV service.

Configure

REX-Ray requires a configuration file for storing details used to communicate with storage providers. This can include authentication credentials and driver specific configuration options. After REX-Ray has been installed, copy and paste the contents below to a new file on the host at /etc/rexray/config.yml to configure s3fs storage driver.

Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+