Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bashor's full-sized avatar

Zalim Bashorov bashor

View GitHub Profile
@clisamurai
clisamurai / Nucleus.md
Last active March 17, 2024 07:18
A simple text editor in a bookmarklet

Nucleus

Nucleus is a plain-text editor hidden in a bookmarklet. It is fully responsive and supports all HTML5-supporting browsers. Nucleus is ultra-lightweight - it doesn't support any formating at all and saves itself along with your files when you save it. You can save Nucleus documents in PDF format by utilising the print-to-PDF functionality of your browser. It is also fully customizable and open-source - simply change the source code.

Requirements

  • An HTML5 compliant web browser

Installation

@staltz
staltz / app.kt
Last active January 26, 2018 01:20
Cycle giving baby steps into Kotlin
import kotlin.browser.document
import kotlin.browser.window
// Type definitions
native("Cycle")
val Cycle : dynamic = noImpl
native("Cycle.h")
fun h(tagName: String) : VTree = noImpl
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@munificent
munificent / gist:9749671
Last active June 23, 2022 04:04
You appear to be creating a new IDE...
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:
@Constellation
Constellation / preview.desktop
Last active August 29, 2015 13:56
PDF reader script
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=Preview
GenericName=Preview
Comment=Show preview of files
Exec=preview.sh %U
Terminal=false
Icon=AdobeReader9
Type=Application
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active February 25, 2024 13:47
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@renatoathaydes
renatoathaydes / ScalaVSCeylon.scala
Last active October 17, 2018 08:29
Scala VS Ceylon
// This is a comparison between Scala and Ceylon based on this previous comparison I made between Haskell and Groovy:
// https://gist.github.com/renatoathaydes/5078535
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible
// combinations between numbers in those lists, here's what we'd do.
/* SCALA */
for { x <- List(2,5,10); y <- List(8,10,11) } yield x*y
@NV
NV / Readme.md
Last active May 28, 2023 20:42
Prepend the debugger statement to a function as easy as stopBefore('Element.prototype.removeChild'). Works in Chrome DevTools and Safari Inspector, doesn’t work in Firebug‘s and Firefox Developer Tools‘ console (I don’t know why). Works as a standalone script everywhere.

stopBefore.js

2min screencast

Examples

stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
@snowmantw
snowmantw / infinity_matrix_curries.js
Last active December 16, 2015 01:39
Because using Array is too mainstream
// From http://stackoverflow.com/questions/14850511/js-matrix-multiplication-issue
function multiplyMatrix(m1, m2) {
var result = [];
for(var j = 0; j < m2.length; j++) {
result[j] = [];
for(var k = 0; k < m1[0].length; k++) {
var sum = 0;
for(var i = 0; i < m1.length; i++) {
sum += m1[i][k] * m2[j][i];
}
@renatoathaydes
renatoathaydes / HaskellVSGroovy.groovy
Last active June 13, 2019 03:59
Haskell VS Groovy
// This is a comparison between Haskell and Groovy based on some simple problems found in the following
// Haskell Introduction:
// http://learnyouahaskell.com/starting-out#ready-set-go
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible
// combinations between numbers in those lists, here's what we'd do.
/* HASKELL */
[ x*y | x <- [2,5,10], y <- [8,10,11]]