HEY: I've turned this into a blog post, which is a little more in depth.
🚨 https://eev.ee/blog/2016/06/04/converting-a-git-repo-from-tabs-to-spaces/ 🚨
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
import java.security.*; | |
public class Sha { | |
public static String hash256(String data) throws NoSuchAlgorithmException { | |
MessageDigest md = MessageDigest.getInstance("SHA-256"); | |
md.update(data.getBytes()); | |
return bytesToHex(md.digest()); | |
} | |
public static String bytesToHex(byte[] bytes) { | |
StringBuffer result = new StringBuffer(); | |
for (byte byt : bytes) result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1)); |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
* MCrypt API available online: | |
* http://linux.die.net/man/3/mcrypt | |
*/ | |
#include <mcrypt.h> |
#!/bin/sh | |
# | |
# Downloads and installs the startssl CA certs into the global java keystore | |
# Author: Klaus Reimer <[email protected]> | |
# | |
# Check if JAVA_HOME is set | |
if [ "$JAVA_HOME" = "" ] | |
then | |
echo "ERROR: JAVA_HOME must be set." |
HEY: I've turned this into a blog post, which is a little more in depth.
🚨 https://eev.ee/blog/2016/06/04/converting-a-git-repo-from-tabs-to-spaces/ 🚨
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
/** | |
* | |
*/ | |
public final class StackBlur { | |
private static final int PARALLEL_THRESHOLD = 2048 * 2048; |
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream, | |
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback | |
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance | |
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
var reqUrl = url.parse(req.url, true) | |
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined; | |
if (cameraName) { | |
try { | |
cameraName = decodeURIComponent(cameraName); |
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2 --enable-logging=stderr | |
// Easier: | |
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*=-2 --enable-logging=stderr |
sudo su | |
echo "deb http://downloads.hipchat.com/linux/apt stable main" > \ /etc/apt/sources.list.d/atlassian-hipchat.list | |
wget -O - https://www.hipchat.com/keys/hipchat-linux.key | apt-key add - | |
apt-get update | |
apt-get install hipchat |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |