Skip to content

Instantly share code, notes, and snippets.

@tml
tml / Encbox.md
Created July 21, 2013 01:54 — forked from Tho85/Encbox.md

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
(defn queue
[& c]
(into
(clojure.lang.PersistentQueue/EMPTY)
c))
(defn k-combos
[k r]
(if (zero? k) nil
(letfn
@tml
tml / README.md
Created September 7, 2013 15:35 — forked from zacharyvoase/README.md

DataURI.py

Data URI manipulation made easy.

This isn't very robust, and will reject a number of valid data URIs. However, it meets the most useful case: a mimetype, a charset, and the base64 flag.

Parsing

@tml
tml / mud-story.txt
Created October 11, 2012 16:50 — forked from anonymous/gist:3158796
Because you shouldn't have to put up with profanity...
to get a list of free programming books, here's the list from a Zed Shaw & Co. programming-related, profanity-filled website.
<div style="text-align: left">
<table>
<tbody><tr><th colspan="3">Programming Languages</th>
</tr><tr>
<td><a href="#Assembly Language">Assembly Language</a></td>
<td><a href="#Bash">Bash</a></td>
<td><a href="#C / C++">C / C++</a></td>
</tr>
if ($type == MAGIC_URL_EMAIL)
{
$html = "$whitespace<!-- $tag --><a$class href='$url'>$text</a><!-- $tag -->$append";
}
else
{
$html = "$whitespace<!-- $tag --><a$class href='$url' onclick='window.open(this.href);return false;'>$text</a><!-- $tag -->$append";
}
if ($type == MAGIC_URL_EMAIL)
{
$html = "$whitespace<!-- $tag --><a$class href='$url'>$text</a><!-- $tag -->$append";
}
else
{
$html = "$whitespace<!-- $tag --><a$class href='$url' onclick='window.open(this.href);return false;'>$text</a><!-- $tag -->$append";
}
return $html;
This is the gist used for the Adobe Summit labs
ex1 https://www.youtube.com/watch?v=mIlI2T_GXM8&feature=youtu.be
ex2 https://www.youtube.com/watch?v=TtP71cZ3zBo&feature=youtu.be
ex3 https://www.youtube.com/watch?v=Cemp0J34LTM&feature=youtu.be
package net.abhinavsarkar.util;
import java.util.Iterator;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
@tml
tml / 1 Instructions - Find Oak Corruptions.md
Created July 15, 2019 12:30 — forked from andrewmkhoury/1 Instructions - Find Oak Corruptions.md
Oak count node check in script console - use while AEM / Oak is running
  1. Go to http://host:port/system/console/bundles and install these two bundles
  2. Go to http://host/system/console/configMgr/org.apache.sling.jcr.base.internal.LoginAdminWhitelist
  3. Add org.apache.felix.webconsole.plugins.scriptconsole to "Whitelist regexp" and save
  4. After the two bundles fully install then go to http://host:port/system/console/sc
  5. Select "Groovy" as the language
  6. Copy/Paste the contents of countNodes-*.groovy script below which matches your oak version to the script console
  7. Click "Execute"
  8. Don't close the browser, the output is displayed in the console UI
@tml
tml / INSTRUCTIONS.md
Created July 15, 2019 12:32 — forked from andrewmkhoury/INSTRUCTIONS.md
oak-run Groovy script to reset the Adobe AEM "admin" user password

To run this script:

  1. Download the oak-run version matching the version of Oak installed in AEM: http://repo1.maven.org/maven2/org/apache/jackrabbit/oak-run
  2. Download the attached adminUtils.groovy script
  3. Upload the adminUtils.groovy script and the oak-run jar to your AEM server
  4. Run the command to start the oak-run console. For example:
    java -Xmx2048m -jar /tmp/oak-run-1.6.1.jar console /app/aem/aem63/crx-quickstart/repository/segmentstore --read-write
    
  5. Once the oak-run console is open then load the groovy script using this command: