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
/* Simple spam protection for email addresses using jQuery. | |
* Well, the protection isn’t jQuery-based, but you get the idea. | |
* This snippet allows you to slightly ‘obfuscate’ email addresses to make it harder for spambots to harvest them, while still offering a readable address to your visitors. | |
* E.g. | |
* <a href="mailto:foo(at)example(dot)com">foo at example dot com</a> | |
* → | |
* <a href="mailto:[email protected]">[email protected]</a> | |
*/ | |
$(function() { |
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
<!--- on initial request, run query ---> | |
<cfset "session.#attributes.myactionfile#" = "" /> | |
<cfsavecontent variable="datasorter_js"> | |
<style type="text/css" title="currentStyle"> | |
@import "css/datatables_table.css"; | |
</style> | |
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function() { |
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
<cfset algorithm = "AES"> | |
<cfset encoding = "hex"> | |
<cfset key = GenerateSecretKey(algorithm)> | |
<cfset str = "This is my secret string." > | |
<cfset enc = Encrypt(str, key, algorithm, encoding)> | |
<cfset dec = Decrypt(enc, key, algorithm, encoding)> |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Sample Form</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
<script type="text/javascript"> |
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
<cfcomponent> | |
<cffunction name="upload" access="remote" returntype="struct" returnformat="json" output="false"> | |
<cfscript> | |
var uploadDir = expandPath('.') & '/uploads/'; // should be a temp directory that you clear periodically to flush orphaned files | |
var uploadFile = uploadDir & arguments.NAME; | |
var response = {'result' = arguments.NAME, 'id' = 0}; | |
var result = {}; | |
// if chunked append chunk number to filename for reassembly | |
if (structKeyExists(arguments, 'CHUNKS')){ |
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> | |
<link rel="stylesheet" href="/examples/stylesheets/ui-lightness/jquery-ui-1.8.16.custom.css" type="css"> | |
<script type="text/javascript" src="/examples/javascripts/jquery.min.js"></script> | |
<script type="text/javascript" src="/examples/javascripts/jquery.base64.min.js"></script> | |
<script type="text/javascript" src="/examples/javascripts/jquery-ui-1.8.16.custom.min.js"></script> | |
<script type="text/javascript" src="/examples/javascripts/jquery.tmpl.min.js"></script> | |
</head> | |
<body> |
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
upstream app { | |
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.app.com; | |
rewrite ^/(.*) http://app.com/$1 permanent; | |
} | |
server { |
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
# Index | |
--------------------------------------------------------------------- | |
curl -XPUT http://localhost:9200/pictures/ -d ' | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"index_analyzer": { | |
"tokenizer": "standard", |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>SendGrid Demo</title> | |
</head> | |
<body> | |
<form action="process.cfm" method="POST"> | |
<div> | |
<label for="emails"> |
OlderNewer