Skip to content

Instantly share code, notes, and snippets.

View autonome's full-sized avatar

Dietrich Ayala autonome

View GitHub Profile
@kevin-smets
kevin-smets / README.md
Last active July 26, 2019 20:27
Private ÐApps - Embark + IPFS (MacOS)

Private ÐApps

With these instructions, you can test a fully local and private ÐApp. Obviously it's not distributed into the cloud here, so it's more like a .. PApp? But we do simulate the full stack locally, so you can push changes to your hearts content!

Prerequisites (software)

  • Node.js (brew install node)
  • IPFS (brew install ipfs)
  • Embark (npm i -g embark)
  • TestRPC (npm i -g ethereumjs-testrpc)
@Lewiscowles1986
Lewiscowles1986 / dhcpcd.sh
Created August 21, 2017 16:00
Raspberry pi stretch allow dhcpcd5 with /etc/network/interfaces
#!/bin/sh -e
#
# This file belongs in /usr/lib/dhcpcd5/dhcpcd how you get it there is up to you
#
DHCPCD=/sbin/dhcpcd
INTERFACES=/etc/network/interfaces
REGEX="^[[:space:]]*iface[[:space:]](*.*)[[:space:]]*inet[[:space:]]*(dhcp|static)"
EXCLUDES=""
@claus
claus / ipfs-server-setup.md
Last active May 9, 2023 03:51
Host Your Site Under Your Domain on IPFS

Host Your Site Under Your Domain on IPFS

This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

@tokland
tokland / promise_map.js
Last active March 1, 2022 00:18 — forked from anvk/promises_reduce.js
Execute promises sequentially (one at at a time) and return array with the results
function promiseMap(inputValues, mapper) {
const reducer = (acc$, inputValue) =>
acc$.then(acc => mapper(inputValue).then(result => acc.push(result) && acc));
return inputValues.reduce(reducer, Promise.resolve([]));
}
/* Example */
const axios = require('axios');
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Custom/fakeRefract" {
Properties {
}
@tobyjsullivan
tobyjsullivan / abbreviateNum.js
Created May 31, 2017 00:57
Abbreviate large numbers in Javascript
// Iterated from: https://stackoverflow.com/questions/10599933/convert-long-number-into-abbreviated-string-in-javascript-with-a-special-shortn
function abbreviateNumber(value) {
let newValue = value;
const suffixes = ["", "K", "M", "B","T"];
let suffixNum = 0;
while (newValue >= 1000) {
newValue /= 1000;
suffixNum++;
}
@anseljh
anseljh / Privacy-by-Design.md
Last active February 8, 2018 22:42
Enhancing Alert App User Privacy by Design

SMS and Privacy

There are a few problems with delivering alerts via SMS, but they mostly boil down to this: SMS is not very private.

For vulnerable audiences, it’s preferable to not collect any subscriber information at all. This isn’t possible with SMS, because you have to know the recipient’s phone number to deliver a message. Unless you’re talking about burners—which most people won’t have—that phone number is tied to a real identity. This is a vulnerability in at least these scenarios:

  • If the alerting app itself gets targeted (whether by LE or other malicious actors), user-identifying information could be leaked.
  • Phone companies cooperate with LE, through legal process (subpoenas) or otherwise, to find out which phone subscribers are receiving SMS alerts.
  • LE , IC, or well-resourced hackers snoop on the SMS network.
@clarkbw
clarkbw / ios-debugger.md
Last active September 19, 2016 20:54
Instructions for the debugger.html to debug Safari running in the iOS simulator

Safari

These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms.

iOS Simulator (Mac only)

Requirements

  • Xcode
  • Download and install Xcode from Apple
@anvk
anvk / promises_reduce.js
Last active October 11, 2023 09:02
Sequential execution of Promises using reduce()
function asyncFunc(e) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(e), e * 1000);
});
}
const arr = [1, 2, 3];
let final = [];
function workMyCollection(arr) {
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi