Skip to content

Instantly share code, notes, and snippets.

@ryanwi
ryanwi / copy-twitter-links.js
Created Sep 22, 2017
Copy all twitter links from a web page
View copy-twitter-links.js
@ryanwi
ryanwi / steps
Last active Jul 29, 2017
Setting up a new linux web server
View steps
https://www.linode.com/docs/security/securing-your-server
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04
https://www.linode.com/docs/websites/hosting-a-website
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04
## create limited user
View programming-languages.dic
ActionScript
Ada
Akka
AppleScript
Arc
Assembly
Boo
C
C++
C#
@ryanwi
ryanwi / postgres csv
Created Feb 22, 2016
Export Query Results as CSV
View postgres csv
$ psql -d postgres://username:password@server:port/database -t -A -F"," -c "query" > output.csv
View slack-emails.js
# 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()})))
View twlist_builder.rb
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)
View Create Azure Linux VM with cli
# 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
@ryanwi
ryanwi / JsonExperiements.cs
Last active Aug 26, 2020
Parse JSON object in C# with different value types
View JsonExperiements.cs
using System;
using Newtonsoft.Json.Linq;
namespace JsonExperiments
{
class Program
{
static void Main(string[] args)
{
ExecuteEmployeeSearch();
@ryanwi
ryanwi / software-terms.dic
Last active Oct 26, 2020
Dictionary of software technology terms
View software-terms.dic
.NET
ActiveMQ
Agile
AI
Android
Ansible
Angular 2/alias[Angular2|Angular 2]
AngularJS/js[Angular]
Apache
API
@ryanwi
ryanwi / rails_new
Last active Dec 17, 2015
Create new Rails app with gemset, using postgresql
View rails_new
$ 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
You can’t perform that action at this time.