This gist details the following:
- Converting a Subversion (SVN) repository into a Git repository
- Purging the resultant Git repository of large files
- Retrieve a list of SVN commit usernames
| IP="127.0.0.1" | |
| PORT="8877" | |
| SHARED_SECRET="shared secret" | |
| OPENSSL="/usr/local/opt/libressl/bin/openssl" | |
| OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" | |
| while IFS= read -r MSG; do | |
| echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" | |
| echo |
| // the original code by apple and its license | |
| // https://developer.apple.com/library/prerelease/content/samplecode/APFSCloning/Listings/clonefile_main_c.html#//apple_ref/doc/uid/TP40017341-clonefile_main_c-DontLinkElementID_5 | |
| NSLog("%@", "\(ProcessInfo().operatingSystemVersion)") | |
| /* Initailize state */ | |
| let s = copyfile_state_alloc(); | |
| let srcPath = NSHomeDirectory() + "/tmp/test.txt" | |
| let copyPath = NSHomeDirectory() + "/tmp/test-copy.txt" |
| module.exports = { | |
| extensions: { | |
| // clojurescript: require('./ext/clojurescript'), | |
| clojure: require('./build/ext/clojure'), | |
| clojurescript: require('./build/ext/clojurescript'), | |
| coffee: require('./build/ext/coffee'), | |
| babel: require('./build/ext/babel'), | |
| html: require('./build/ext/html') | |
| } | |
| } |
This gist details the following:
| # Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md | |
| # /usr/local/Library/Contributions/example-formula.rb | |
| # | |
| # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! | |
| # | |
| # FOR LOCAL INSTALLATION COPY IT IN /usr/local/Library/Formula/ | |
| # | |
| class J2objc < Formula | |
| homepage "http://j2objc.org/" |
| >>> INSTALL | |
| pip3.4 install weasyprint | |
| >>> EXAMPLE | |
| from weasyprint import HTML, CSS | |
| html_src=''' | |
| <h1>The title</h1> | |
| <p>Content goes here |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
| server { | |
| listen 80 default deferred; | |
| server_name www.example.com; | |
| root /home/example/app/example_app/public; | |
| ## Start mobile redirection code | |
| set $mobile_request false; | |
| set $mobile_cookie ""; | |
| if ($http_user_agent ~* '(Mobile|WebOS)') { |
| require 'base64' | |
| require 'open-uri' | |
| require 'net/http' | |
| require 'net/https' | |
| require 'json' | |
| class OCR | |
| attr_reader :api_key, :image_url | |
| def self.scan(api_key:, image_url:) |
| Copyright (c) $today.year NECTEC | |
| National Electronics and Computer Technology Center, Thailand | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |