Skip to content

Instantly share code, notes, and snippets.

View kishaningithub's full-sized avatar

Kishan B kishaningithub

View GitHub Profile
@wizardbeard
wizardbeard / python-3.9-slim.Dockerfile
Last active November 7, 2023 08:22
Build OpenSSL on python:3.9-slim
FROM python:3.9-slim as builder
RUN apt-get update -y && apt-get install -y --no-install-recommends wget make build-essential libssl-dev zlib1g zlib1g-dev
RUN mkdir -p /tmp/python
WORKDIR /tmp/python
RUN wget https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tar.xz
@mxcl
mxcl / stargazer.sh
Last active October 31, 2023 17:22
All-in-one Script to Generate your @pomber/stargazer video
#!/usr/bin/env -S pkgx +git +gum +gh +npm +jq bash
# ^^ curl https://pkgx.sh | sh
# ^^ pkgx makes all those tools (including bash!) available to the script
# no packages are installed; your system remains pristine
set -eo pipefail
if [ -d stargazer/.git ]; then
cd stargazer
elif [ ! -d .git ] && gum confirm 'clone to ./stargazer?'; then
@paolocarrasco
paolocarrasco / README.md
Last active May 3, 2024 15:20
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@seanhandley
seanhandley / docker-compose.yml
Last active April 9, 2024 04:05
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@albertodeste
albertodeste / barcode-generator
Created March 23, 2018 15:55
Javascript barcode generator
javascript:(function(){for(var eanCode="",i=0;12>i;i++)eanCode+=Math.floor(10*Math.random());var checkDigit=0,rs=eanCode.split("");for(rs=rs.reverse(),rs=rs.join(""),counter=0;counter<rs.length;counter++)checkDigit+=parseInt(rs.charAt(counter))*Math.pow(3,(counter+1)%2);checkDigit=(10-checkDigit% 10)% 10,prompt("EAN13",eanCode+checkDigit);})();
@ptrstpp950
ptrstpp950 / preRequestScript.js
Last active April 18, 2024 21:10
Calculate TOTP in Postman
//Article about TOTP on my blog https://stapp.space/generate-totp-in-postman/
/**
* @preserve A JavaScript implementation of the SHA family of hashes, as
* defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding
* HMAC implementation as defined in FIPS PUB 198a
*
* Copyright Brian Turek 2008-2017
* Distributed under the BSD License
* See http://caligatio.github.com/jsSHA/ for more information
@ForgottenUmbrella
ForgottenUmbrella / publish_python.md
Last active December 25, 2023 21:49
How to publish Python apps for human beings

How to publish Python apps for human beings

So, you've created a Python app (be it a graphical user interface with Qt or the like, or a simple command line interface). Great! But how are others going to use it? Python applications often have dependencies (e.g. from third-party modules), and they also need a Python interpreter to run them. For a developer, installing all the necessary bits and bobs to make things work is okay, but that's unacceptable for a normal user - they just want to download the thing and run it.

Below are simple instructions to publish your app on the three main operating systems: Windows, macOS and Linux.

@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"]; cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
front_end[label="Front-end App"]; extension[label="Browser Extension"];
@paladini
paladini / aws-ec2-redis-cli.md
Last active February 20, 2024 04:05 — forked from todgru/aws-ec2-redis-cli.md
AWS redis-cli without redis server on AWS EC2

Setup redis-cli without the whole Redis Server on AWS EC2

This fast tutorial will teach you how to install redis-clion AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:

$ sudo yum install gcc

This may return an "already installed" message, but that's OK. After that, just run:

$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli