This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" | |
try | |
set appPath to (path to application "Evernote" as text) | |
on error | |
display dialog "Couldn't find Evernote. Is it installed?" | |
end try | |
set printPath to (path to "dlib" from user domain as text) & "PDF Services" | |
make new alias at printPath to appPath with properties {name:"Send PDF to Evernote"} | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// no direct access | |
defined('_JEXEC') or die; | |
// Variables | |
$doc = JFactory::getDocument(); | |
$user = JFactory::getUser(); | |
$template = 'templates/' . $this->template; | |
// get html head data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING: This is just a workaround. Consider it as a very | |
# temporary solution if you really need this feature. | |
from django.utils.safestring import mark_safe | |
from django_select2.util import convert_to_js_arr | |
TEMPORARY_ID = 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style type="text/css" media="screen"> | |
input { | |
display: block; | |
margin-top: 10px; | |
} | |
#modal { | |
background-color: #affdc2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In the example here, where three repos are used, the idea is to take advantage of ssh's config mechanism | |
# For use with Jenkins, do the following: | |
# login to your CI Server | |
sudo su -s /bin/bash jenkins | |
cd ~/.ssh/ | |
# then create three key key pairs | |
ssh-keygen -f id_rsa_project1 | |
# on prompt, set target file to id_rsa_project1 | |
# repeat for id_rsa_project2 and id_rsa_project3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* From: http://abhinavsingh.com/blog/2009/12/how-to-use-locks-in-php-cron-jobs-to-avoid-cron-overlaps/ | |
*/ | |
define('LOCK_DIR', '/tmp/'); | |
define('LOCK_SUFFIX', '.lock'); | |
class CronHelper { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04 | |
sudo apt-get update | |
sudo apt-get install mysql-server | |
sudo apt-get install nginx | |
sudo service nginx start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ti.App.Properties.setList('DB_queue', []); | |
Ti.App.Properties.setBool('DB_locked', false); | |
Ti.App.Properties.setBool('DB_queue_running', false); | |
Ti.include('db.js', 'examples.js'); |