The systemd service daemon'izes the fantastic create_ap bash script by oblique
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (: | |
function flatMap<T, U>(array: T[], mapFunc: (x: T) => U[]) : U[] { | |
return array.reduce((cumulus: U[], next: T) => [...mapFunc(next), ...cumulus], <U[]> []); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface PubSubCallback | |
{ | |
(args?: any, topic?: any) : void; | |
} | |
interface PubSubTopicMap | |
{ | |
[topic : string]: PubSubCallback[]; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Minification failed. Returning unminified contents. | |
(19,462-469): run-time error JS1019: Can't have 'break' outside of loop: break n | |
*/ | |
/** | |
* @license | |
* lodash 3.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE | |
* Build: `lodash modern -o ./lodash.js` | |
*/ | |
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||n===w&&e)return 1;if(n<t||!e||t===w&&r)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return typeof n=="string"?n:null==n?"":n+""}function o(n){return n.charCodeAt(0)}function i(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r));); | |
return r}function f(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.a,r.a)||t.b-r.b}function c(n){return $n[n]}function l(n){return Ln[n]}f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# pacman_pkg_bak.sh | |
# reinstall with pacman -S $(cat pkglist) | |
#Explanation of next steps: | |
# | |
################################# | |
#pacman package backup: # | |
################################# | |
#'pacman -Qqet' will (Q)uery (q)uiety and r(e)strict output to #explicitly installed packages (by me #of course, the user, and #further limit that list to what is also unrequired(t). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read line; do | |
echo $line | grep -v "^#" > /dev/null || continue | |
size=`stat -c %s "${line}"` | |
totalsize=$((totalsize + size)) | |
done < $1 | |
echo "Total Size: $(($totalsize / (1024*1024)))M" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# bealebone black virtual ethernet interface | |
sudo ifconfig usb0 up | |
sudo ifconfig usb0 192.168.10.1 | |
# internet forwading | |
sudo iptables -A POSTROUTING -t nat -j MASQUERADE | |
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define F_CPU 16000000UL | |
#include <avr/io.h> | |
#include "util/delay.h" | |
void init_ADC(void){ | |
// ADC voltage reference | |
// REFS1 REFS0 Description | |
// 0 0 AREF |