Skip to content

Instantly share code, notes, and snippets.

View lewdlime's full-sized avatar
🏠
Working from home

Sammy S. lewdlime

🏠
Working from home
View GitHub Profile
@lewdlime
lewdlime / ContentVersionController.apxc
Created October 13, 2015 18:29
ContentVersion Pagination Code for Salesforce
public with sharing class ContentVersionController {
public List<ContentVersion> pageContent { get; set; }
public List<ContentVersion> content { get; set; }
private ApexPages.StandardSetController controller;
private Integer pageNumber;
private Integer pageSize;
private Integer totalPageNumber;
public ContentVersionController() {
//controller = new ApexPages.StandardSetController();
@lewdlime
lewdlime / README
Created December 15, 2015 18:14 — forked from glts/README
Benchmark for Vim regexp engine performance
Regular expressions and data from
http://lh3lh3.users.sourceforge.net/reb.shtml
Regular expressions benchmarked:
URI ([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?
Email ([^ @]+)@([^ @]+)
Date ([0-9][0-9]?)/([0-9][0-9]?)/([0-9][0-9]([0-9][0-9])?)
URI|Email ([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)
Word .*SCSI-
@lewdlime
lewdlime / mongod.conf.yaml
Created April 1, 2016 00:33
MongoDB Windows 32-bit Configuration
systemLog:
verbosity: 2
quiet: true
traceAllExceptions: false
path: C:\MongoDB\data\log\mongod.log
logAppend: false
logRotate: rename
destination: file
timeStampFormat: iso8601-local
processManagement:
set: Warning: path component /usr/local/git/bin may not be valid in PATH.
set: No such file or directory
set: Warning: path component /usr/local/mysql/bin may not be valid in PATH.
set: No such file or directory
set: Warning: path component /usr/local/git/libexec/git-core may not be valid in PATH.
set: No such file or directory
set: Warning: path component /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin may not be valid in PATH.
set: No such file or directory
set: Warning: path component /usr/local/opt/groovy/libexec may not be valid in PATH.
set: No such file or directory
@lewdlime
lewdlime / aliases.sh
Created May 26, 2016 01:33
ZSH Configurations
# aliases
# vim: fdm=marker ff=unix ft=sh ss=4 ts=4
# Aliases {{{
alias cls=clear
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ${HOME}/.dircolors && eval "$(dircolors -b ${HOME}/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
@lewdlime
lewdlime / LCPCallback_Prizmo-Evernote-Next.md
Last active June 9, 2016 19:48
x-url-callback Workflow using Launch Center Pro, Prizmo, Next, & Evernote. The workflow is made to scan a receipt, send the value to Next, then save the receipt to Evernote.

OCR Workflow: LCP

NOTE: Be aware that when scanning with Prizmo or any other OCR app on iOS, the app will only be able to recognize text if you scan enough of the document for it to catch enough text to register as readable text on the document. What this means is that if you try to scan only the receipt's total, such as 8.26, Prizmo will always fail to capture the text. You have to capture all of of the receipt, then delete any extra text that shows up with the total on the receipt.

@lewdlime
lewdlime / tumblr-following.py
Last active January 19, 2018 09:05
Tumblr Following JSON Export
#!/usr/bin/python2
import oauth2
import urlparse
import pytumblr
import json
REQUEST_TOKEN_URL = 'http://www.tumblr.com/oauth/request_token'
AUTHORIZATION_URL = 'http://www.tumblr.com/oauth/authorize'
ACCESS_TOKEN_URL = 'http://www.tumblr.com/oauth/access_token'
# To get the Consumer key and Consumer secret, you will need to
@lewdlime
lewdlime / ABC Preview.html
Created October 10, 2016 22:06
Editorial app ABC Notation Preview Theme
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://raw.githubusercontent.com/paulrosen/abcjs/master/bin/abcjs_plugin_latest-min.js" type="text/javascript"></script>
<title>ABC Preview</title>
<style type="text/css">
html {
width: 100%;
height: 100%;