Skip to content

Instantly share code, notes, and snippets.

View 7flash's full-sized avatar
🎯
Focusing

Igor Berlenko 7flash

🎯
Focusing
  • Telegram @galaxygur
  • X @berliangor
View GitHub Profile
@mathiasbynens
mathiasbynens / appify
Created November 12, 2010 13:46 — forked from subtleGradient/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@soarez
soarez / ca.md
Last active April 15, 2025 12:46
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@pastleo
pastleo / index.js
Created May 28, 2016 06:31
freecodecamp crawler using promise, generator and coroutine
var request = require('request-promise');
var co = require('co');
var fs = require('fs');
var cheerio = require('cheerio');
var dateFormat = require('dateformat');
var usernames = ['jd615645', 'jayhung97724'];
var fcc_info = [];
@artjomb
artjomb / CryptoJS_byteArrayWordArrayConversions.js
Last active April 14, 2025 13:21
Convert a byte array to a word array and back in CryptoJS-compatible fashion
function byteArrayToWordArray(ba) {
var wa = [],
i;
for (i = 0; i < ba.length; i++) {
wa[(i / 4) | 0] |= ba[i] << (24 - 8 * i);
}
return CryptoJS.lib.WordArray.create(wa, ba.length);
}
@hiiamyes
hiiamyes / use-asyncawait.js
Created September 13, 2016 17:36
bed crawler
let moment = require('moment');
let cheerio = require('cheerio');
let async = require('asyncawait/async');
let await = require('asyncawait/await');
let rp = require('request-promise');
const URL = 'https://npm.cpami.gov.tw/bed_1.aspx';
const getASPState = () => {
return new Promise( (resolve, reject) => {
@jameswomack
jameswomack / npm-update.js
Created October 13, 2016 19:40
Building an npm update string generator
function makeObjectIterable (foo) {
foo[Symbol.iterator] = function* () {
yield* Object.keys(foo).map(function (name) {
return [name, foo[name]]
})
}
return foo
}
@GLMeece
GLMeece / latency_numbers.md
Last active February 22, 2025 10:46
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@marjoballabani
marjoballabani / Nodejs-deap-learning.md
Last active November 17, 2017 14:54
Nodejs in deep

Nodej in deep

This article is for those who have basic knowledge of javascript

Javascript aside

Javascript thinks you should know to make sure you understand nodejs properly

  1. With functions you can do everythink you can do with other types because functions are First-Type
  2. Objects are a collection of name/value pairs
@creotip
creotip / installApps.sh
Created November 4, 2017 11:09 — forked from anonymous/installApps.sh
Solus OS Automatic installation of stuff for developers
sudo eopkg install -y git
sudo eopkg install -y atom
sudo eopkg it gnome-tweak-tool
apm install color-picker file-icons minimap
apm install linter-csslint linter-eslint linter-js-yaml
sudo eopkg it -y neofetch
sudo eopkg bi --ignore-safety https://raw.githubusercontent.com/solus-project/3rd-party/master/network/web/browser/google-chrome-stable/pspec.xml
sudo eopkg it -y google-chrome-*.eopkg;sudo rm google-chrome-*.eopkg
@rgbatty
rgbatty / obsidian-wsl-linking.sh
Created March 22, 2022 05:38
Obsidian WSL Linking
#!/bin/bash
echo "Starting Windows configuration"
WIN_USERPATH=$(wslpath $(wslvar USERPROFILE))
WIN_OBSIDIAN=$WIN_USERPATH/Documents/obsidian
WIN_VAULTSDIR=$WIN_OBSIDIAN/vaults
WSL_OBSIDIAN=~/obsidian
if [ ! -d "$WIN_VAULTSDIR" ]; then