Skip to content

Instantly share code, notes, and snippets.

View pmirshad's full-sized avatar

Irshad Pananilath pmirshad

  • Kozhikode, Kerala
View GitHub Profile
@pmirshad
pmirshad / scanner.sh
Created February 20, 2024 12:02 — forked from andyrbell/scanner.sh
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
@pmirshad
pmirshad / Redis notes
Created June 9, 2023 10:33 — forked from fredead/Redis notes
Automating creation of a redis cluster
Fireup all our nodes.
I could find information about this only which was odd. The tutorial is nice if you are setting up some static site ala the early 00's.
So this is some notes on creating a cluster by hang which will feed into the creation of a puppet / ansible / chef / shell / slat script
to do the main part of creating the cluster.
I note also many clients do not support redis in cluster mode WTF?
Open up this in a browser
https://redis.io/commands/cluster-slots
FROM alpine:3.11 AS build
ARG CHANNEL=unstable
ARG VERSION=0.99.1-127
ARG ARCH=amd64
RUN mkdir /build
WORKDIR /build
RUN apk add --no-cache curl tar
@pmirshad
pmirshad / kubectl.md
Created April 29, 2021 08:38 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@pmirshad
pmirshad / sane-caching.nginx.conf
Created April 10, 2021 06:43 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.
@pmirshad
pmirshad / .gitignore
Created February 25, 2021 04:48 — forked from rfay/.gitignore
Create a huge reference repo
nbproject
@pmirshad
pmirshad / set-jdk8-alts.sh
Created March 21, 2019 06:37 — forked from chasetec/set-jdk8-alts.sh
Setup Oracle JDK 8 for Redhat based systems using the alternatives command
#!/bin/sh
jdk=/usr/java/jdk1.8.0_05
jre=$jdk/jre
alternatives \
--install /usr/bin/java java $jre/bin/java 180005 \
--slave /usr/lib/jvm/jre jre $jre \
--slave /usr/bin/keytool keytool $jre/bin/keytool \
--slave /usr/bin/orbd orbd $jre/bin/orbd \
@pmirshad
pmirshad / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@pmirshad
pmirshad / designer.html
Created December 19, 2014 17:27
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
@pmirshad
pmirshad / designer.html
Created December 19, 2014 17:27
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>