Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
# udev rule : SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0666", SYMLINK+="lsm303agr" | |
import serial | |
import re | |
import time | |
import signal | |
import math | |
# registers |
<?php | |
/** | |
* Class Afas | |
* | |
* This class has 3 static functions for accessing data using the Afas GetConnectors and UpdateConnectors. | |
* It includes the GET, POST and PUT request in their valid format. | |
* | |
* IMPORTANT: For it to work, remember to change the BASE_URL and TOKEN constants in the class. | |
* |
#!/bin/sh | |
JSON='[{"arg":["sleep 14; echo testing"],"client":"local","expr_form":"glob","fun":"cmd.run","tgt":"*"}]' | |
RESPONSE=`curl -ik https://localhost:8000/login -H 'Content-Type: application/json' -d '[{"eauth":"pam","password":"SOMEPASSWORD","username":"SOMEUSERNAME"}]' 2>/dev/null` | |
TOKEN=`echo $RESPONSE | grep -oP "[[:alnum:]]{40}" | uniq` | |
RESPONSE=`curl -ik https://localhost:8000/minions -H 'Accept: application/json' -H "X-Auth-Token: $TOKEN" -H 'Content-Type: application/json' -d "$JSON" 2>/dev/null` | |
JID=`echo $RESPONSE | grep -oP "[0-9]{20}" | uniq` | |
#echo GOT $JID |
''' | |
Tic Tac Toe | |
A very (very) basic game in Python | |
''' | |
def tictactoe(): | |
#create an empty raster | |
def makeRaster(row, col): |
aka "Let's take some notes about using Docker on Mac OS X to turn deployment of Scala applications into a much better experience."
DISCLAIMER The doc is a compilation of different articles and videos found on the Internet. Almost nothing's mine - mostly layout. See CREDITS section below to know who to praise. All mistakes are mine and are not intended. Drop me an email at [email protected] if you spot any errors or just share what you think about the doc.
The document lives at https://gist.github.com/jaceklaskowski/ca55be80cb76e84ce478
I'm on Mac OS X and so you're going to see a lot of setup tweaks for the platform that are not necessarily needed for your environment, esp. Linux one. When you see boot2docker
and you're on Linux, just disregard the line or even entire paragraph.
-- A (somewhat buggy) script to export all albums from Photos.app to a directory | |
-- Based on the script written by Nic Fletcher (see https://discussions.apple.com/message/28098849#28098849) | |
set srcParent to "iPhoto Events" -- Folder that album is in | |
set exportBase to "some:path:" | |
tell application "Photos" | |
set albList to name of every container of container srcParent | |
end tell | |
repeat with albSource in albList | |
set folderExists to false |
Add this to Info.plist
in /System/Library/Spotlight/RichText.mdimporter/Contents/
and Spotlight will search for source code files.
<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source
int SIGNAL_LED = 13; | |
int POWER_LED = 11; | |
byte buffer[100]; | |
byte myAddress[] = {-1, -114, 70, -125}; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(SIGNAL_LED, OUTPUT); | |
pinMode(POWER_LED, OUTPUT); |