Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/osascript
on run argv
if not (count argv) = 2
return "Usage:\n pptx-to-pdf <input file> <output file>"
end if
set pwd to do shell script "pwd"
set _input to item 1 of argv as text
@cawka
cawka / vpn
Created August 12, 2019 01:58
ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTo2c21udnVh@ca231.vpnbook.com:80/?outline=1
In native code, create the following:
// Globals
static jmethodID midStr;
static char * sigStr = "(Ljava/lang/String;ILjava/lang/String;)V";
// Init - One time to initialize the method id, (use an init() function)
midStr = (*env)->GetMethodID(env, class, "javaDefineString", sigStr);
// Methods
// From https://stackoverflow.com/questions/31797268/using-boost-log-on-android-for-logcats
#include <iostream>
typedef enum android_LogPriority {
ANDROID_LOG_UNKNOWN = 0,
ANDROID_LOG_DEFAULT,
ANDROID_LOG_VERBOSE,
ANDROID_LOG_DEBUG,
ANDROID_LOG_INFO,
@cawka
cawka / docker-compose.yml
Created June 26, 2019 15:51
BIND in docker
version: '2.1'
services:
bind:
restart: always
image: cawka/bind9:v1
build: .
ports:
- "53:53/udp"
- "53:53/tcp"
@cawka
cawka / dnsmasq.conf
Created June 26, 2019 14:24
Demo PI1: /etc/dnsmasq.conf
port=0
interface=wlan0
dhcp-range=10.1.1.100,10.1.1.200,255.255.255.0,24h
@cawka
cawka / interfaces
Created June 26, 2019 14:22
Demo PI1: /etc/network/interfaces
auto eth0
iface eth0 inet manual
auto wlan0
iface wlan0 inet static
address 10.1.1.1
broadcast 10.1.1.255
netmask 255.255.255.0
auto br0
; localhop_security should be enabled when NFD runs on a hub.
; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
localhop_security
{
; This section defines the trust model for NFD RIB Management. It consists of rules and
; trust-anchors, which are briefly defined in this file. For more information refer to
; validator configuration file format documentation:
;
; https://named-data.net/doc/ndn-cxx/current/tutorials/security-validator-config.html
;
#include "ns3/lte-module.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/mobility-module.h"
#include "ns3/applications-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/config-store.h"
#include <cfloat>
#include <sstream>
@cawka
cawka / vimrc
Created November 20, 2018 20:20
" colorscheme cawka
set wrap linebreak
map <Up> gk
map <Down> gj
" set showbreak=.
let &sbr = nr2char(8618).' ' " Show ↪ at the beginning of wrapped lines