Skip to content

Instantly share code, notes, and snippets.

View eyecatchup's full-sized avatar

Stephan Schmitz eyecatchup

View GitHub Profile
@eyecatchup
eyecatchup / crypto-sha.js
Created March 13, 2019 19:53 — forked from chrisveness/crypto-sha.js
Uses the SubtleCrypto interface of the Web Cryptography API to hash a message using SHA-256.
/**
* Returns SHA-256 hash from supplied message.
*
* @param {String} message.
* @returns {String} hash as hex string.
*
* @example
* sha256('abc').then(hash => console.log(hash));
* const hash = await sha256('abc');
*/
@eyecatchup
eyecatchup / README.md
Created May 21, 2018 12:23 — forked from surma/README.md
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@eyecatchup
eyecatchup / package.json
Created April 19, 2018 14:45 — forked from surma/package.json
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
@eyecatchup
eyecatchup / certificate.sh
Created March 12, 2018 11:35 — forked from WebReflection/certificate.sh
A basic Self Signed SSL Certificate utility
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to
@eyecatchup
eyecatchup / accordion.html
Last active February 7, 2018 14:46 — forked from umidjons/accordion.html
AngularJS: Accordion with custom directives (restrict, replace, transclude, template, controller, angular.forEach(), scope, link)
<!doctype html>
<html lang="en-US" data-ng-app="Accordion">
<head>
<meta charset="UTF-8">
<title>AngularJS: Accordion Example with Custom directives</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.js"></script>
<style type="text/css">
.expander{ border: 1px solid black; width: 250px; }
.expander>.title{ background: black; color: white; padding: .1em .3em; }
@eyecatchup
eyecatchup / gist:acfdc9e974e39679899a1891b0539228
Created February 8, 2017 22:59 — forked from stef-levesque/gist:11233090
Batch file to compute KEY for movdump.exe
@echo off
REM The key is generated using your machine's current time.
REM The formula is 13333 + (current hour * 7113) + (current minute * 77).
REM Calc that out by hand and use it with the -key parameter then
REM you can use movdump by itself without the GUI at all.
set HH=%TIME:~0,2%
set MM=%TIME:~3,2%
set /a KEY=13333+%HH%*7113+%MM%*77
index.php: The Main component of CTB-Locker for Websites and contains the encryption and decryption routines as well as the payment page.
allenc.txt: Contains a list of all encrypted files.
test.txt: Contains the path and filenames to two prechosen files that can be decrypted for free.
victims.txt: It contains a list of all files that are to be encrypted. However, the files that are already encrypted will remain in this list.
extensions.txt: - The list of file extensions that should be encrypted.
secret_[site_specific_string]: The secret file used by the Free Decrypt and Chat functions and is located in the same folder as the index.php file.
Via:
http://erdeni.ru/access.php
http://studiogreystar.com/access.php
@eyecatchup
eyecatchup / namespaceRefactor.php
Created February 18, 2016 13:21 — forked from hpbuniat/namespaceRefactor.php
Super-simple script to convert a existing project to use namespaces
<?php
/**
* Super-simple script to convert a existing project to use namespaces
*
* @author Hans-Peter Buniat <[email protected]>
* @copyright 2012 Hans-Peter Buniat <[email protected]>
* @license http://opensource.org/licenses/BSD-3-Clause
*/
class namespaceRefactor {
@eyecatchup
eyecatchup / logger.js
Created February 16, 2016 11:50 — forked from jareware/logger.js
Simple utility for unified logging to the console, with optional timestamping.
/**
* Simple utility for unified logging to the console, with optional timestamping.
*
* @example // Create several loggers around the application:
* var log = logger.create('main');
* var logInAnotherModule = logger.create('anotherModule');
*
* // Call the created loggers:
* log('Application started');
* logInAnotherModule('Module started');