Skip to content

Instantly share code, notes, and snippets.

View ryanwi's full-sized avatar

Ryan Williams ryanwi

View GitHub Profile
@ryanwi
ryanwi / rails_new
Last active December 17, 2015 17:39
Create new Rails app with gemset, using postgresql
$ rvm use --create 2.1@app_name
$ gem install rails --no-ri --no-rdoc
$ rails new app_name --database=postgresql
$ cd app_name/
$ rvm --rvmrc 2.1@app_name
$ git init
$ git add .
# setup db
$ rake db:drop db:create db:migrate db:seed
@ryanwi
ryanwi / software-terms.dic
Last active December 27, 2023 18:40
Dictionary of software technology terms
.NET
.NET Core
Agile
AI/alias[AI|Artificial Intelligence]
Airflow
Android
Ansible
Angular 2/alias[Angular2|Angular 2]
AngularJS/js[Angular]
API
@ryanwi
ryanwi / JsonExperiements.cs
Last active August 26, 2020 12:35
Parse JSON object in C# with different value types
using System;
using Newtonsoft.Json.Linq;
namespace JsonExperiments
{
class Program
{
static void Main(string[] args)
{
ExecuteEmployeeSearch();
# Install command line tools
# http://www.windowsazure.com/en-us/documentation/articles/command-line-tools/
# setup xplat-cli (Cross Platform Command Line Interface)
# http://www.windowsazure.com/en-us/documentation/articles/xplat-cli/#install
$ azure account download
$ azure account import {path to .publishsettings file}
info: Executing command account import
info: Found subscription: Windows Azure MSDN - Visual Studio Professional
info: Setting default subscription to: Windows Azure MSDN - Visual Studio Professional
require 'twitter'
# twitter app keys from dev.twitter.com
KEY = ''
SECRET = ''
TOKEN = ''
TOKEN_SECRET = ''
# Add members in batch
def add_list_members(list_slug, members)
# With Chrome, go to your slack team https://*.slack.com/team
# Open JS console
copy(JSON.stringify($.map($("a[title*='Email']"), function(a) {return $(a).text()})))
@ryanwi
ryanwi / postgres csv
Created February 22, 2016 00:11
Export Query Results as CSV
$ psql -d postgres://username:password@server:port/database -t -A -F"," -c "query" > output.csv
ActionScript
Ada
Akka
AppleScript
Arc
Assembly
Boo
C
C++
C#
@ryanwi
ryanwi / server-setup.md
Last active September 21, 2024 23:31
Setting up a new linux web server

create limited user

adduser example_user

adduser example_user sudo OR

@ryanwi
ryanwi / copy-twitter-links.js
Created September 22, 2017 21:34
Copy all twitter links from a web page