Skip to content

Instantly share code, notes, and snippets.

View abdul's full-sized avatar
🎯
Focusing

Abdul Qabiz abdul

🎯
Focusing
View GitHub Profile
==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
@abdul
abdul / animation.ino
Created March 16, 2023 04:55 — forked from hsiboy/animation.ino
FUNCTION-BASED ANIMATION SEQUENCES FOR WS2812 LED STRIPS Using FastLED library - Author: Dave Morris: http://www.google.com/+DaveMorris128
// FUNCTION-BASED ANIMATION SEQUENCES FOR WS2812 LED STRIPS
// Using FastLED library
// Author: Dave Morris: http://www.google.com/+DaveMorris128
// Version 1.0 (2014-07-31)
//
//
// The following code includes "primitive animations" which are the base effect and
// "aggregate animations" which are combinations of one or more primitive animations
// Feel free to combine different primitives each loop for synergistic results but:
// -If using an aggregate animation make sure your primatives don't clear the buffer each frame (FastLED.clear())
@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`?