Skip to content

Instantly share code, notes, and snippets.

View ivanionut's full-sized avatar
🎯
Focusing

Ivan Ionut ivanionut

🎯
Focusing
View GitHub Profile
@ivanionut
ivanionut / index.html
Created November 1, 2012 11:54
A CodePen by ivanionut. Makisu - CSS 3D Dropdown Concept
<header class="header">
<hgroup>
<h1>Makisu</h1>
<h2>CSS 3D Dropdown Concept</h2>
</hgroup>
</header>
<section class="demo">
<dl class="list nigiri">
@ivanionut
ivanionut / index.html
Created November 1, 2012 11:54
A CodePen by ivanionut. Makisu - CSS 3D Dropdown Concept
<header class="header">
<hgroup>
<h1>Makisu</h1>
<h2>CSS 3D Dropdown Concept</h2>
</hgroup>
</header>
<section class="demo">
<dl class="list nigiri">
@ivanionut
ivanionut / nginx_rails_3_1
Created November 11, 2012 12:55 — forked from shapeshed/nginx_rails_3_1
Nginx Config for Rails 3.1 with Unicorn and Asset Pipeline
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 {
@ivanionut
ivanionut / gist:4071128
Created November 14, 2012 09:12 — forked from dskaggs/gist:3788338
Using caching to improve your ColdFusion application's performance

As you write more and larger ColdFusion applications, you will start looking for ways to improve the performance of your applications. There are many ways to do this but one of the easiest is to use ColdFusion's caching mechanisms to reduce the amount of work your application has to do over and over. Caching simply refers to the idea that you create a piece of content or data once and hold it in application memory for some period of time. During that time frame, any part of your application that needs that content or data uses the copy that was previously generated rather than regenerating it.

ColdFusion has several different caching mechanisms built in, but they generally fall into two main categories--programmatic caching and application server caching.

##Programmmatic Caching This type of caching is controlled by your application code. You decide which parts of your application would benefit from being cached and use CFML tags and attributes to determine what content is cached and how long your applicati

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
#!/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
<!--[if IE 6]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie6 no-js"><![endif]-->
<!--[if lt IE 7]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie6 lte9 lte8 lte7 no-js"><![endif]-->
<!--[if IE 7]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie7 lte9 lte8 lte7 no-js"> <![endif]-->
<!--[if IE 8]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie8 lte9 lte8 no-js"><![endif]-->
<!--[if IE 9]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="ie ie9 lte9 no-js"><![endif]-->
<!--[if gt IE 9]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="gtie9 ie9 no-js"><![endif]-->
<!--[if !IE]><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="not-ie no-js"><![endif]-->
rrete
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.4
Comment: Hostname: keyserver.ubuntu.com
mI0ES0iRjwEEAKrhhQjtN7mGr0fLnbicSAxepUOevRbhRJuQsjpSA/lJp2XLogXGLnZSjXrO
78UjB9Jwoy/OFIxIBVOuEYAuLEMLaHL7sb4bgPAqi5K8GTN3CTffbMRt3GOAOCK9K8mQRVHD
BJCulx+ghRdhUReFHQ/Rbr4t+E7SpwoqHdQTO1HXABEBAAG0GExhdW5jaHBhZCBMZW8gTW9s
bCdzIFBQQYi2BBMBAgAgBQJLSJGPAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ1tlR
DdKUp1LebAP+MFWcZnvM5gZqiVt0rKP4H6mVSg9o4tjt92ojuLWgF3aqdx28IzSWX5L873lT
nvww89lhYV2lKAcrf5fARgaNRdWGK9cDcgRiXILLeL/7fZPkaEZEdMcOElvJCpMEiR96hhbE
<cffunction name="httpget" access="private" returnType="any" output="No">
<cfargument name ="source" type="string" required="true"/>
<cfargument name ="destination" type="string" required="true"/>
<cfargument name ="ConnectTimeout" type="numeric" required="false" default="10" hint="Time Out in Seconds"/>
<cfargument name ="ReadTimeout" type="numeric" required="false" default="60" hint="Time Out in Seconds" />
<cfargument name ="dimensions" type="numeric" required="false" default="255"/>
<cfset local.urlconnection = createObject("java", "java.net.URL").init(arguments.source)>
<cfset local.connection = local.urlconnection.openConnection() />
<cfset local.connection.setConnectTimeout(javaCast("int",arguments.ConnectTimeout*1000)) />