A lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.sh
#!/bin/bash -e | |
# | |
# Copyright (c) 2012-2013 Robert Nelson <robertcnelson@gmail.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |
root@arm:~# dpkg --get-selections | |
adduser install | |
apache2 install | |
apache2-mpm-worker install | |
apache2-utils install | |
apache2.2-bin install | |
apache2.2-common install | |
apt install | |
apt-utils install | |
aptitude install |
A lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.sh
import subprocess | |
import smtplib | |
import socket | |
from email.mime.text import MIMEText | |
import datetime | |
# Change to your own account information | |
to = 'me@example.com' | |
gmail_user = 'test@gmail.com' | |
gmail_password = 'yourpassword' | |
smtpserver = smtplib.SMTP('smtp.gmail.com', 587) |
var port = 0; | |
var endpoint = 0x01; | |
var device = { vendorId: 0x04b8, productId: 0x0202}; | |
var connect = function(callback) { | |
chrome.permissions.getAll(function(p) { | |
if (p.permissions.indexOf('usb') >= 0) { | |
//construct permission object for our device | |
var obj = { usbDevices: [device] }; |
wget https://raw.github.com/gkaindl/beaglebone-ubuntu-scripts/master/bb-get-rcn-kernel-source.sh | |
chmod +x bb-get-rcn-kernel-source.sh | |
./bb-get-rcn-kernel-source.sh |
var b = require('bonescript'); | |
var led = "P8_10"; | |
var state = 0; | |
b.pinMode(led, 'out'); | |
toggleLED = function() { | |
state = state ? 0 : 1; | |
b.digitalWrite(led, state); | |
}; |
A simple Ghostscript command to merge two PDFs in a single file is shown below:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf
Install Ghostscript:
Type the command sudo apt-get install ghostscript
to download and install the ghostscript package and all of the packages it depends on.
import pru_speak | |
botspeak_code = \ | |
''' SET DIO[0] , 1 | |
WAIT 1 | |
SET DIO[0], 0 | |
WAIT 1 | |
GOTO 0''' | |
pru_speak.load(botspeak_code) |