Skip to content

Instantly share code, notes, and snippets.

View johanoloflindberg's full-sized avatar
💭
Ready to work 😃

WEBBAB johanoloflindberg

💭
Ready to work 😃
View GitHub Profile
--
-- OCR all documents added to a folder
--
on adding folder items to this_folder after receiving added_items
try
repeat with i from 1 to number of items in added_items
set this_item to item i of added_items
set appName to my getAppName()
tell application appName
activate
window.fluid.dockBadge = '';
setTimeout(updateDockBadge, 1000);
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 5000);
function updateDockBadge() {
var newBadge = '';
var res = findInboxAnchorMatchResult();
if (res) {
window.fluid.dockBadge = '';
setTimeout(updateDockBadge, 1000);
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 5000);
function updateDockBadge() {
var navigation = document.querySelector('[role=navigation]')
var doc = navigation.contentDocument || navigation.ownerDocument;
// use for patterns:
// *gmail.com*
// *mail.google.com*
// *google.com*mail*
window.fluid.dockBadge = '';
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 15000);
function updateDockBadge() {
<script type="text/javascript">
// Redirect to a page
(function () {
window.location = 'http://google.com';
})();
</script>

Basic HTTP Authentication is when a user is required to log in to access a directory. This isn't meant to be secure by any means, but it's useful for locking out a majority of users from accessing a folder (e.g. staging a website).

To start, you must add this into your .htaccess:

AuthUserFile "/var/www/full/path/to/your/folder/.htpasswd"
AuthName "Message to go on user's login screen"
AuthType Basic
Allow from all
Require valid-user

Options +Indexes

@johanoloflindberg
johanoloflindberg / wp-db-backup.sh
Last active August 29, 2015 14:26 — forked from pelmered/wp-db-backup.sh
WP-CLI snippets and scripts
# Only database backup
declare -a SITES=('site1' 'site2' 'site3' 'site4');
SITES_PATH_BASE=/var/www/
SITES_PATH_SUFIX=/repo/public
SITES_BACKUP_FOLDER=backups
CURRENT_DATE=`date +%Y-%m-%d`;
@johanoloflindberg
johanoloflindberg / website-checklist.md
Last active September 19, 2015 06:40 — forked from magicznyleszek/website-checklist.md
Website Checklist
@johanoloflindberg
johanoloflindberg / checklist.md
Last active September 19, 2015 06:36 — forked from cole007/checklist.md
Launch checklist
  • 404 page
  • print CSS
  • robots.txt
  • humans.txt
  • favicon.ico
  • compresses CSS
  • minified JS
  • google analytics code
  • webmaster tools
  • 301s (redesign sites)
@johanoloflindberg
johanoloflindberg / checklist.md
Last active September 19, 2015 06:36 — forked from cole007/checklist.md
Launch Checklist

@asclearasmud

SEO

  • robots.txt (ignore any system files/folders)
  • humans.txt
  • responsive meta tag (ensure user scaleable is set to yes)
  • meta keyword and description
  • Google Analytics code
  • site added to Google Webmaster Tools (GWT)
  • sitemap.xml added and uploaded to GWT