(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| tell application "System Events" | |
| -- get current clipboard contents as a string | |
| set CurrentClipboard to the clipboard as string | |
| -- set the clipboad to your password | |
| set the clipboard to "Y0urVPNPa$$w0rd" | |
| -- start playing with the VPN | |
| tell current location of network preferences | |
| #!/usr/bin/env python | |
| ## Tiny Syslog Server in Python. | |
| ## | |
| ## This is a tiny syslog server that is able to receive UDP based syslog | |
| ## entries on a specified port and save them to a file. | |
| ## That's it... it does nothing else... | |
| ## There are a few configuration parameters. | |
| LOG_FILE = 'youlogfile.log' |
| -- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor | |
| -- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password | |
| -- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility | |
| -- 4. Enable Applescript Editor and System UI Server | |
| -- 5. Trigger script from the menu | |
| -- 6. Enjoy being connected | |
| tell application "Cisco AnyConnect Secure Mobility Client" | |
| activate | |
| end tell |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <inttypes.h> | |
| // OLED hardware versions | |
| #define OLED_V1 0x01 | |
| #define OLED_V2 0x02 | |
| // commands | |
| #define LCD_CLEARDISPLAY 0x01 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // This #include statement was automatically added by the Spark IDE. | |
| #include "Adafruit_GFX.h" | |
| // This #include statement was automatically added by the Spark IDE. | |
| #include "Adafruit_SSD1306.h" | |
| /********************************************************************* | |
| This is an example for our Monochrome OLEDs based on SSD1306 drivers |
| #!/bin/sh | |
| # mass deskew scanned files via command line | |
| # - requires: ImageMagick and Deskew Tool | |
| # - see http://galfar.vevb.net/wp/tag/deskew | |
| for d in "$@"; do | |
| file=`basename "$d" .pdf` | |
| cd "`dirname "$d"`" |
| -- Please set your vpn connection name and password here | |
| set VPNName to "VPN name" | |
| set VPNpassword to "VPN password" | |
| tell application "System Events" | |
| tell current location of network preferences | |
| set VPNService to service VPNName | |
| end tell | |
| set isConnected to connected of current configuration of VPNService |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
| class ChatRoom(roomId: Int, actorSystem: ActorSystem) { | |
| private[this] val chatRoomActor = actorSystem.actorOf(Props(classOf[ChatRoomActor], roomId)) | |
| def websocketFlow(user: String): Flow[Message, Message, _] = ??? | |
| def sendMessage(message: ChatMessage): Unit = chatRoomActor ! message | |
| } |