Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/osascript
on run argv
if not (count argv) = 2
return "Usage:\n graffle2pdf <input file> <output file>"
end if
set pwd to do shell script "pwd"
set _input to item 1 of argv as text

Keybase proof

I hereby claim:

  • I am cawka on github.
  • I am afanasyev (https://keybase.io/afanasyev) on keybase.
  • I have a public key whose fingerprint is 9619 01AD 556C AF09 CB11 95D2 916A A0CD 5E85 70C9

To claim this, I am signing this object:

import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "net.named_data.nfd"
@cawka
cawka / OnSwipeTouchListener.java
Created March 13, 2015 18:53
Helper to handle swipe gestures on Android
/* -*- Mode:jde; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2015 Regents of the University of California
*
* This file is part of NFD (Named Data Networking Forwarding Daemon) Android.
* See AUTHORS.md for complete list of NFD Android authors and contributors.
*
* NFD Android is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2011-2015 Regents of the University of California.
*
* This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
* contributors.
*
* ndnSIM is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
#! /usr/bin/osascript
on run argv
if not (count argv) = 2
return "Usage:\n graffle2pdf <input file> <output file>"
end if
set pwd to do shell script "pwd"
set _input to item 1 of argv as text
@cawka
cawka / NDNLPv2.md
Last active August 29, 2015 14:23 — forked from yoursunny/NDNLPv2.md

NDNLPv2

NDNLPv2 is a link protocol for Named Data Networking.

Goals

NDNLPv2 provides the following features:

  • fragmentation and reassembly: fragment a network layer packet to fit in link MTU
  • reliability: reduce packet loss
@cawka
cawka / LOG4CXX-417---r1556413.patch
Last active August 29, 2015 14:23
LOG4CXX upstream patches for Homebrew
Index: src/main/cpp/stringhelper.cpp
===================================================================
--- src/main/cpp/stringhelper.cpp (revision 1556412)
+++ src/main/cpp/stringhelper.cpp (revision 1556413)
@@ -30,6 +30,10 @@
#include <cctype>
#include <iterator>
#include <apr.h>
+//LOG4CXX-417: need stdlib.h for atoi on some systems.
+#ifdef APR_HAVE_STDLIB_H
diff --git a/wake.cpp b/wake.cpp
index c34165b..0e64493 100644
--- a/wake.cpp
+++ b/wake.cpp
@@ -25,13 +25,13 @@ void WAKE_Base::GenKey(word32 k0, word32 k1, word32 k2, word32 k3)
CRYPTOPP_COMPILE_ASSERT(sizeof(x) == 4);
static int tt[10]= {
0x726a8f3b, // table
- 0xe69a3b5c,
- 0xd3c71fe5,
@cawka
cawka / ndn-tr-header.tex
Created January 26, 2016 23:44
Add NDN-TR header
\documentclass{article}
\usepackage{pdfpages}
\usepackage{url,soul,hyperref,eso-pic,xcolor}
\makeatletter
\AddToShipoutPicture*{%
\setlength{\@tempdimb}{20pt}%
\setlength{\@tempdimc}{\paperheight}%
\setlength{\unitlength}{1pt}%
\small