Skip to content

Instantly share code, notes, and snippets.

View ismailuddin's full-sized avatar
🏠
Working from home

I Uddin ismailuddin

🏠
Working from home
View GitHub Profile
@zaydek-old
zaydek-old / bookmark.min.js
Last active January 22, 2023 13:42
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@davidpiesse
davidpiesse / tailwind_md_all_colours.js
Last active April 5, 2024 14:55
A colour set for Tailwind CSS that include all Material Design Colours, shades, accents and contrast colours
// https://davidpiesse.github.io/tailwind-md-colours/
//
//Notes
//
//All colours are generated from Material Design Docs
//Colours have a base, a set of shades (50-900) accent colours
//In addition a companion set of contrast colours are included for colouring text / icons
// Example usage
// class="w-full bg-red-600 text-red-600-constrast"
@guimeira
guimeira / main.cpp
Created December 15, 2017 13:19
Using mouse to select image region (OpenCV and C++)
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
struct SelectionState {
Point startPt, endPt, mousePos;
bool started = false, done = false;
Rect toRect() {
@syedrakib
syedrakib / RSA_example.py
Last active August 3, 2023 18:22
An example of asymmetric encryption in python using a public/private keypair - utilizes RSA from PyCrypto library
# Inspired from http://coding4streetcred.com/blog/post/Asymmetric-Encryption-Revisited-(in-PyCrypto)
# PyCrypto docs available at https://www.dlitz.net/software/pycrypto/api/2.6/
from Crypto import Random
from Crypto.PublicKey import RSA
import base64
def generate_keys():
# RSA modulus length must be a multiple of 256 and >= 1024
modulus_length = 256*4 # use larger value in production
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 13:29
NSSM - the Non-Sucking Service Manager cheatsheet.
@fiznool
fiznool / hashid.js
Created November 16, 2014 09:45
Short 'hash' ID generator.
'use strict';
/**
* The default alphabet is 25 numbers and lowercase letters.
* Any numbers that look like letters and vice versa are removed:
* 1 l, 0 o.
* Also the following letters are not present, to prevent any
* expletives: cfhistu
*/
var ALPHABET =
@maephisto
maephisto / Javascript ISO country code to country name conversion
Last active November 3, 2023 21:05
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@minrk
minrk / Retina Figures.ipynb
Created August 9, 2012 04:37
2x plots for Retina displays with matplotlib and the IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tucotuco
tucotuco / globalmaptiles.py
Created September 4, 2011 21:56
Classes to calculate Tile coordinates
#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008
# Global Map Tiles Classes
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326,
# generate a simple HTML viewers based on Google Maps and OpenLayers
# Author: Klokan Petr Pridal, klokan at klokan dot cz
# Web: http://www.klokan.cz/projects/gdal2tiles/