Skip to content

Instantly share code, notes, and snippets.

View karloscarweber's full-sized avatar
📱
Building

Karl Weber karloscarweber

📱
Building
View GitHub Profile
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@karloscarweber
karloscarweber / dither.js
Created June 15, 2018 14:38 — forked from mattdesl/dither.js
dither-blob.js
const sketcher = require('canvas-sketch-tool'); // not yet public
// Import geometry & utilities
const createRegl = require('regl');
const createPrimitive = require('primitive-icosphere');
const createCamera = require('perspective-camera');
const glslify = require('glslify');
const hexRgb = require('hex-rgb');
// Utility to convert hex string to [ r, g, b] floats
<?php
$view = new View($this, false);
$view->set(compact('some', 'vars'));
$html = $view->render('view_name');
@karloscarweber
karloscarweber / Uploader.php
Created August 25, 2011 16:49 — forked from JunaidQadirB/Uploader.php
The Uploader class is a simple php script that makes file uploads a bit easier.
<?php /* The Uploader class is a simple php script that makes file
* uploads a bit easier.
* @author Junaid Qadir Baloch (shekhanzai.baloch@gmail.com)
* @version 0.1 10:18 PM 7/30/2011
*/
class Uploader
{
private $allowedFileTypes;
private $maxFileSize = 1048576;
private $fileInputBoxName;