Skip to content

Instantly share code, notes, and snippets.

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

AbdulSamii Ajala jalasem

🏠
Working from home
View GitHub Profile
@aishat001
aishat001 / Index.js
Created November 18, 2019 18:14
Bubble sort using recursion...
let unsortedBubble = [3, 10, 6, 1, 2, 5, 7, 4, 8, 9];
let swap;
function bubbleSort(bubble) {
swap = false;
let all = bubble.length - 1;
for (let i = 0, j = 1; i < all; i++, j++) {
if (bubble[i] > bubble[j]) {
swap = true;
[bubble[i], bubble[j]] = [bubble[j], bubble[i]];
#!/bin/bash
hostname=$(hostname -s)
cd ~/Library/Application\ Support/com.bohemiancoding.sketch3/
rm .license && touch .license && echo '{"meta":{"generated_at":"'$(date)'","sign":"==","device_name":"'$hostname "("$(id -un)')"},"payload":{"status":"ok","application":"sketch3","type":"license","udid":"c2d8c1dd037f919d57124de1037eeb22efad6bd1","expiration":"9999999999"}}' >> .license
echo '127.0.0.1 backend.bohemiancoding.com' | sudo tee -a /etc/hosts
@jalasem
jalasem / lambda-not-anon.md
Created August 4, 2016 19:12
The distinction between anonymous functions and lambdas in JavaScript.

TL;DR - Lambda means "function used as data".

Anonymous function means "function without a name".

This is one of the relatively few cases where the Wikipedia definition of a word, while not entirely wrong, is misleading. Lambdas and anonymous functions are distinct ideas.

These ideas are commonly confused because in many programming languages (and lambda calculus) all lambdas are anonymous or vise verse.

In JavaScript, not all lambdas are anonymous, and not all anonymous functions are lambdas, so the distinction has some practical meaning.

@jalasem
jalasem / localStorage_bomb.html
Created May 16, 2016 04:59 — forked from kampar/localStorage_bomb.html
localStorage bomb to test your browser on how many characters your browser able to save
<html>
<head>
<title>M. Jazman, Fuse</title>
<meta charset="utf-8">
<script>
localStorage.setItem("fuse", "-");
while(true) {
var fuse = localStorage.getItem("fuse");
try {
@logbon72
logbon72 / nigeria_state_polygons.json
Created January 2, 2016 13:12
Coordinate Boundaries for Nigerian States
{
"ABIA": [
[5.3918045732398, 7.3196411132812],
[5.4246168391946, 7.3388671875],
[5.4437565043427, 7.3663330078125],
[5.5285105256928, 7.4020385742188],
[5.6282859838703, 7.4006652832031],
[5.6856833027592, 7.3814392089844],
[5.6952489676056, 7.4020385742188],
[5.8428131655266, 7.3855590820312],
@derhuerst
derhuerst / intro.md
Last active May 13, 2023 17:56
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.