Skip to content

Instantly share code, notes, and snippets.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api

@juancarloscruzd
juancarloscruzd / html5-template.html
Created July 10, 2014 22:03
HTML5 Template (commented)
<!DOCTYPE html>
<head>
<!-- Tell Internet Explorer to use the most current layout engine available
READ: https://www.modern.ie/en-us/performance/how-to-use-x-ua-compatible -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Declare a character set for web performance
Do it through the HTTP header as the first option
Make sure HTTP header and meta tag are the same
READ: https://developers.google.com/speed/docs/best-practices/rendering#SpecifyCharsetEarly -->
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/3.0.1/normalize.css" type="text/css" media="screen">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js" /></script>
<script type="text/javascript" src="https://mandrillapp.com/api/docs/js/mandrill.js"></script>
<style>
.main-wrapper{
height: 800px;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
public class Main extends JFrame {
public Main() {
setSize(300, 300);
setTitle("Window Listener");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
package com.mkyong.jdbc;
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class JDBCTransactionExample {
private static final String DB_DRIVER = "oracle.jdbc.driver.OracleDriver";
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{mathrsfs}
\usepackage{amssymb}
\usepackage[colorinlistoftodos]{todonotes}
Setting up Sendy with Laravel
(there might be bugs, I striped out some parts of my code because what I have is more complicated then that, so, sorry if it's broken!)
--
I would recommand creating a database for Sendy only.
Add Sendy's database into your database.php (1)
Create the Campaign model (2), and specify that you want to use Sendy's database (Campaigns are the only thing we really need to create, other things like creating lists can be done through Sendy interface, and there is a PHP library to add subscribers)
Now, it's time to install Sendy, usually somewhere like yourapp.com/sendy or yourapp.com/newsletter