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 / .emacs
Last active November 13, 2018 15:03
;; Make sure history of command and files is remembered
;; ____________________________________________________________________________
;; Aquamacs custom-file warning:
;; Warning: After loading this .emacs file, Aquamacs will also load
;; customizations from `custom-file' (customizations.el). Any settings there
;; will override those made here.
;; Consider moving your startup settings to the Preferences.el file, which
;; is loaded after `custom-file':
;; ~/Library/Preferences/Aquamacs Emacs/Preferences
;; _____________________________________________________________________________
@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.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="8002001" android:versionName="0.2.1" package="net.named_data.nfd" platformBuildVersionCode="19" platformBuildVersionName="4.4.2-1456859">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19">
</uses-sdk>
<uses-permission android:name="android.permission.INTERNET">
</uses-permission>
<uses-permission android:name="android.permission.READ_LOGS">
</uses-permission>
<application android:theme="@7F0D0000" android:label="@7F0C000E" android:icon="@7F020057" android:debuggable="true" android:allowBackup="true">
@cawka
cawka / android-shared-lib-dependencies.sh
Last active March 22, 2021 10:09
Recursively calculate shared library dependencies and generate System.load(); statements
# Set correct path to readelf binary in Android NDK
READELF=/opt/crystax-ndk-10.3.1/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf
# List libraries that exist in /system/lib
STANDARD_LIBS=(c dl m stdc++ log z)
has() {
local p=$1
shift
local x
/* -*- 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