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 / 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;
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+
@abdul
abdul / install-quake3.sh
Created May 16, 2020 08:40 — forked from simonewebdesign/install-quake3.sh
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@abdul
abdul / disqus-ondemand.html
Created May 12, 2020 07:18 — forked from robwent/disqus-ondemand.html
Loads Disqus comments on click with native JavaScript. Opens comments when linked to directly.
<div class="comments-block">
<button id="show-comments" onclick="disqus();return false;">Load Comments</button>
</div>
<div id="disqus_thread"></div>
<script>
var disqus_loaded = false;
var disqus_shortname = 'xxxx'; //Add your shortname here
@abdul
abdul / WP to Jekyll Migration Notes
Created May 12, 2020 00:55 — forked from kerim/WP to Jekyll Migration Notes
Notes on migrating Wordpress Blog to GitHub Project Pages using Jekyll and the Hyde theme
I recently migrated ( http://keywords.oxus.net/ ) from my own server to GitHub project pages using Jekyll and the Hyde theme ( https://github.com/poole/hyde ). This Gist documents some of the issues I faced and how I solved the problems.
1. I tried to follow the instructions found on these sites:
http://blog.8thcolor.com/en/2014/05/migrate-from-wordpress/
http://blog.codeinside.eu/2014/09/13/How-We-Moved-From-Wordpress-To-Jekyll-On-Windows/
http://www.nooku.org/blog/2013/03/from-wordpress-to-jekyll/
http://chadfield.org/work/how-i-migrated-wordpress-to-jekyll/
http://www.girliemac.com/blog/2013/12/27/wordpress-to-jekyll/
http://virtuallyhyper.com/2014/05/migrate-from-wordpress-to-jekyll/