Skip to content

Instantly share code, notes, and snippets.

View gregelin's full-sized avatar

Greg Elin gregelin

  • RegScale, Inc.
  • Knoxville, TN
  • 08:59 (UTC -04:00)
View GitHub Profile
@gregelin
gregelin / csv2xml.py
Created May 30, 2011 01:25 — forked from justinvw/csv2xml.py
Simple script to convert a CSV file to XML
#!/usr/bin/python
# encoding: utf-8
"""
csv2xml.py
Created by Justin van Wees on 2011-04-18.
"""
import sys
import os
import string
@gregelin
gregelin / wp-db.tutorial.php
Created January 14, 2012 10:11 — forked from benbalter/wp-db.tutorial.php
WordPress DB Tutorial
<?php
//absolute path to wp-load.php, or relative to this script
//e.g., ../wp-core/wp-load.php
include( 'trunk/wp-load.php' );
//grab the WPDB database object, using WP's database
//more info: http://codex.wordpress.org/Class_Reference/wpdb
global $wpdb;
@gregelin
gregelin / CDBS Station Info using Wordpress Core (PHP)
Created January 15, 2012 17:23
Early script to display station data from CDBS database using WordPress Core
<?php
include( '/codedata/code/wp-core-trunk/wp-load.php' );
//grab the WPDB database object, using WP's database
global $wpdb;
//make a new DB object using a different database
$cdbs = new wpdb('root','galgren','cdbs','localhost'); ?>
<?php define('WP_USE_THEMES', true); ?>
<?php get_header(); ?>
<?php
@gregelin
gregelin / Use a gem in Ruby Command Line (IRB)
Created May 21, 2012 18:30
Use a gem in Ruby Command Line (IRB)
> irb
>> require 'fech'
=> true
>>
@gregelin
gregelin / .vimrc
Created January 21, 2013 17:11
Example vimrc file that provides line numbers and syntax coloring from http://vim.wikia.com/wiki/Example_vimrc
" URL: http://vim.wikia.com/wiki/Example_vimrc
" Authors: http://vim.wikia.com/wiki/Vim_on_Freenode
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
@gregelin
gregelin / gist:4630791
Created January 25, 2013 01:30
Great Links for DevOps & Continuation
@gregelin
gregelin / SublimeConfigIvan.txt
Created January 25, 2013 16:58
Ivan's Sublime Configuration Tips
sublime
http://net.tutsplus.com/articles/news/perfect-workflow-in-sublime-text-free-course/
https://tutsplus.com/lesson/http-requests-within-sublime/
https://tutsplus.com/lesson/livereload/
https://tutsplus.com/lesson/vintage-mode/
https://tutsplus.com/lesson/sublime-and-markdown-with-marked/
http://netatoo.github.com/phoenix-theme/
@gregelin
gregelin / filebrowser
Created April 8, 2013 11:54
Set up finder windows for side by side file browsing
try
tell application "Finder"
-- a little reset
close every window
activate
-- a variable which holds the path to the folder opened in the left window
-- the path uses ":" instead of "/" to separate parent from children folders
set left_window_path to "Macintosh HD:Users:stelian:Dropbox:911:python" as alias
make new Finder window to left_window_path
-- resizing the first window {left, top, width, height}

Server Setup

Unsere Setup-Routine für eine Rails-App mit Nginx, Passenger, rvm auf einen Host Europe-VPS mit Ubuntu 10.4.

Installation der benötigten Pakete

apt-get update

apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \

@gregelin
gregelin / index.html
Last active December 19, 2015 23:08
Display License View Example
<html><head><title>API Test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head><body>
<div id='tweet-list'></div>
<script type="text/javascript">
$(document).ready(function() {
// Get query string from URL