Skip to content

Instantly share code, notes, and snippets.

View yanokwa's full-sized avatar

Yaw Anokwa yanokwa

View GitHub Profile
@yanokwa
yanokwa / mac-osx-el-captain-commands.sh
Created September 28, 2016 21:30 — forked from rahul286/mac-osx-el-captain-commands.sh
Updating to Mac elCapitan using downloaded pkg file
## based on https://github.com/lioonline/OS-X-El-Capitan
## pkg file link - http://osxapps.itunes.apple.com/apple-assets-us-std-000001/Purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/ftk3252456602304584541.pkg
# Run this from folder where you have downloaded or copied ftk3252456602304584541.pkg file
#create a tmp folder
mkdir elCapitanRoot && cd elCapitanRoot
#create a folder structure to match apple server
sudo mkdir -p ./apple-assets-us-std-000001/Purple3/v4/74/d2/82/74d28291-9db9-7ae2-305d-9b8b3f5fd463/
@yanokwa
yanokwa / # mobile-shell - 2016-09-26_09-47-33.txt
Created September 26, 2016 10:04
mobile-shell on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for mobile-shell on macOS 10.11.6
Build date: 2016-09-26 09:47:33
#!/bin/bash
# safety
set -e
# variables
HOSTNAME=$1
WAR_PATH="/var/lib/tomcat6/webapps/ROOT.war"
WAR_FOLDER_PATH="/var/lib/tomcat6/webapps/ROOT"
TIMESTAMP=$(date +%Y-%m-%dT%H:%M:%SZ)
#!/bin/bash
# @nightly /bin/bash /root/ODK/export_submissions.sh
set -e
JAVA_BIN="/usr/bin/java"
BRIEFCASE_JAR="/root/ODK/briefcase.jar"
AGGREGATE_URL="https://myserver.appspot.com"
### SSL Part 2: Configure Tomcat 6 with Java KeyStore (JKS)
This is part two of a three-part series on how to configure a single SSL certificate for use on both Tomcat and Apache. Here we'll cover setting up Tomcat 6 to use your Java KeyStore, which we created in [Part 1](/tutorials/ssl-create-java-keystore-jks-tomcat.php) of this series.
#### 1\. Adding the SSL connector to Tomcat's configuration
Tomcat 6 stores its configuration in /etc/tomcat6/server.xml
To open the file, run the following:
# sudo nano /etc/tomcat6/server.xml
### SSL Part 1: Creating Java SSL KeyStore (JKS)
This is part one of a three-part series on how to configure a single SSL certificate for use on both Tomcat and Apache. I'll take you through creating a new Java KeyStore (JKS), submitting a Certificate Signing Request (CSR), and finally, importing the singed certificate into your KeyStore.
#### 1\. First, create a directory for your SSL files
# sudo mkdir /etc/my_ssl
#### 2\. Now change into that directory
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>anokwa.com &raquo; On monkeys in mountains&#8230;</title>
<meta name="generator" content="WordPress 3.8.4" /> <!-- leave this for stats -->
@yanokwa
yanokwa / gist:88e33de4303b0c5f4f9e
Last active August 29, 2015 14:05
/help/form-design/xlsform/
This page redirects to http://xlsform.org. If you want to make changes, edit https://github.com/XLSForm/xlsform.github.io instead.
XLSForm is a tool to simplify the creation of forms. Forms can be designed with Excel and XLSForm will convert it to an XForm that can be used with ODK tools. This tutorial teaches you to build your forms using Excel. Please refer to the <a href="http://opendatakit.org/wp-content/uploads/2013/06/sample_xlsform.xls">sample Excel file</a> as you read through the tutorial.
<h1>Basic format</h1>
Each workbook must have two worksheets: survey and choices.
<ul>
<li>The survey worksheet contains the structure and most of the content of the form. It contains the full list of questions and information about how they should be presented. Most rows represent a question; the rest of the rows specify control structures such as groups.</li>
<li>The choices worksheet is used to specify the options for multiple choice questions. Each row represents a multiple choice option. Choices with the sa
@yanokwa
yanokwa / gist:a2a03d691ef4cf3d5bee
Created August 29, 2014 20:23
/help/form-design/data-preloading
Beginning with ODK Collect 1.4.3, you can pre-load data into a new submission.
If you have pre-existing data from a baseline survey, a listing survey, or any other source, you may want to reference that data in your survey form. For example, you might already have data on a household's agricultural plots when you go to collect follow-up data about those plots.
When you want to reference pre-existing data in a survey form, the first step is to upload one or more .csv files as support files when you upload your form definition (the same way you upload media support files in the Form Upload window). The first row of each .csv file should be a header that includes short, unique names for each column; subsequent rows should contain the data itself.
Columns in your .csv files must be separated by commas. Depending on your regional settings, Excel may save .csv files with semi-colons or other characters between columns, instead of commas; if that's the case, you will need to manually replace the column separators
@yanokwa
yanokwa / kindlegen.rb
Last active August 29, 2015 13:57 — forked from dch/kindlegen.rb
require 'formula'
class Kindlegen < Formula
url 'http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v2_9.zip'
homepage 'http://www.amazon.com/gp/feature.html?docId=1000765211'
md5 '0e21737cbe1ec74e33d5cf722767e18c'
version '2.9'
skip_clean 'bin'