Skip to content

Instantly share code, notes, and snippets.

View alpinskiy's full-sized avatar
💭
Don't try to be clever

Mikhail alpinskiy

💭
Don't try to be clever
View GitHub Profile
@dsamarin
dsamarin / Complex.js
Created October 3, 2011 03:11
Complex numbers in JavaScript
var Complex = function(real, imag) {
if (!(this instanceof Complex)) {
return new Complex (real, imag);
}
if (typeof real === "string" && imag == null) {
return Complex.parse (real);
}
this.real = Number(real) || 0;
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active July 4, 2024 17:31
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@masuidrive
masuidrive / gist:5231110
Created March 24, 2013 08:45
clang options
OVERVIEW: LLVM 'Clang' Compiler: http://clang.llvm.org
USAGE: clang -cc1 [options] <inputs>
OPTIONS:
-### Print the commands to run for this compilation
--analyze Run the static analyzer
--migrate Run the migrator
--relocatable-pch Build a relocatable precompiled header
--serialize-diagnostics <value>
@debasishm89
debasishm89 / HeapWalker.py
Last active August 28, 2019 15:30
HeapWalker - Walking Windows 7 process heaps using pydbg
'''
HeapWalker - Walking Windows 7 process heaps using pydbg
Author : Debasish Mandal
Blog :http://www.debasish.in/
Twitter : https://twitter.com/debasishm89
Description : This python script is simplest implementation of Windows HeapWalk() API.
It uses pydbg and allows user to Walk Through debugee process's heaps on the fly.
@nepsilon
nepsilon / how-to-batch-convert-jpg-images-to-progressive-jpg-images.md
Last active May 28, 2024 22:27
How to batch convert JPG images to progressive JPG images? — First published in fullweb.io issue #82

How to batch convert JPG images to progressive JPG images?

Progressive JPG images, as opposed to baseline JPG, will display right away in the browser, and will load bits of it in cycle, rendering it from blur to clear.

Progressive is known to provide a better user experience, preventing the ”fax loading” effect. Where the image is displayed in full, but sequentially from top to bottom.

The imagemagick package will install the convert command that you can run to convert JPG to progressive:

convert -strip -interlace Plane -quality 80 input-file.jpg output-file.jpg