Skip to content

Instantly share code, notes, and snippets.

using System;
using TwitterNET;
namespace MyApp
{
public class MyApp()
{
Twitter t = new Twitter(); //Creates a regular Twitter object with no user associated
Twitter t = new Twitter("myusername", "mypassword"); //Will authenticate with the provided credentials
using System;
using TwitterNET;
namespace MyApp
{
public class MyApp()
{
Twitter t = new Twitter("myusername", "mypassword");
IList<StatusMessage> statusMessages = t.GetFriendsTimeline(new StatusRequestOptions); //Returns list of statuses with no parameters passed
#!/bin/bash
#This will reconfigure the Xorg server on Ubuntu systems
#You'll need to type in your password
sudo dpkg-reconfigure xserver-xorg
#After running this do the following
#Logout
#Press Alt-F1
#Login to terminal
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = [email protected]:mkoby/MovieRenamer.git
fetch = +refs/heads/*:refs/remotes/origin/*
test "should create band" do
assert_difference('Band.count') do
assert_difference('User.count') do
post :create, :band => { :name => "MyBand",
:website => "www.myband.com",
:hometown_city => "Houston",
:hometown_state => "TX",
:subdomain => "myband" },
:user => { :band => assigns(:band),
:username => "testuser",
#I think, to use 'rescue' you need to have a 'begin'
def call_created
begin
callbacks = get_callbacks
if callbacks
callbacks.created(patient, assessment) if callbacks.respond_to?(:created)
end
rescue Exception => ex
puts "......................................#{ex}"
@mkoby
mkoby / @response.body.html
Created May 18, 2011 21:17
Typus Redirecting On Tests
<html>
<body>
You are being <a href="http://test.host/admin/session/new?back_to=%2Fadmin%2Fcredits%2Fnew">redirected</a>.
</body>
</html>
@mkoby
mkoby / rails_upgrade_check.txt
Created August 23, 2011 21:06
rake rails:upgrade:check results for LiveShow
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
Soon-to-be-deprecated ActiveRecord calls
Methods such as find(:all), find(:first), finds with conditions, and the :joins option will soon be deprecated.
More information: http://m.onkey.org/2010/1/22/active-record-query-interface
The culprits:
- app/models/band.rb
- app/views/bands/_form.html.erb
- app/models/band.rb
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libusb-1.0.0.dylib
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ImageMagick configure 6.7.1, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.7.1-1 --disable-dependency-tracking --enable-shared --disable-static --with-modules --without-gslib --with-gs-font-dir=/usr/local/share/ghostscript/fonts --without-magick-plus-plus
## --------- ##
## Platform. ##