Skip to content

Instantly share code, notes, and snippets.

Ken Collins metaskills

Block or report user

Report or block metaskills

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View crud.rb
require 'tiny_tds'
puts 'Connecting to SQL Server'
@client = TinyTds::Client.new(
host: 'localhost', port: 1433,
username: 'sa', password: ENV['SA_PASSWORD'],
database: 'SampleDB'
)
def execute(sql)
@client.execute(sql).do
View connect.rb
require 'tiny_tds'
puts 'Connecting to SQL Server'
@client = TinyTds::Client.new(
host: 'localhost', port: 1433,
username: 'sa', password: ENV['SA_PASSWORD'],
)
def execute(sql)
@client.execute(sql).do
true
end
@metaskills
metaskills / output.txt
Created Feb 22, 2017
Test FreeTDS Connection
View output.txt
$ tsql -S localhost -U sa -P $SA_PASSWORD
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1> SELECT @@VERSION
2> GO
Microsoft SQL Server vNext (CTP1.3) - 14.0.304.138 (X64)
Feb 13 2017 16:49:12
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
@metaskills
metaskills / command.sh
Last active May 31, 2019
Ubuntu 16.04 Install Latest FreeTDS
View command.sh
$ sudo apt-get install wget
$ sudo apt-get install build-essential
$ sudo apt-get install libc6-dev
$ wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.27.tar.gz
$ tar -xzf freetds-1.00.27.tar.gz
$ cd freetds-1.00.27
$ ./configure --prefix=/usr/local --with-tdsver=7.3
$ make
$ make install
@metaskills
metaskills / log.txt
Created Feb 22, 2017
Ubuntu 16.04 FreeTDS Install Log
View log.txt
Setting up freetds-common (0.91-6.1build1) ...
Setting up libsybdb5:amd64 (0.91-6.1build1) ...
Setting up freetds-bin (0.91-6.1build1) ...
Setting up libct4:amd64 (0.91-6.1build1) ...
Setting up freetds-dev (0.91-6.1build1) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
root@9ecf83463240:/# tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc/freetds
@metaskills
metaskills / finishline.txt
Created Jan 15, 2017
Current SQL Server Rails v5 Tests
View finishline.txt
4849 runs, 14208 assertions, 6 failures, 1 errors, 3 skips
4849 runs, 14203 assertions, 9 failures, 2 errors, 3 skips
4849 runs, 14201 assertions, 12 failures, 2 errors, 3 skips
4849 runs, 14201 assertions, 13 failures, 2 errors, 3 skips
4851 runs, 14202 assertions, 14 failures, 4 errors, 3 skips
4851 runs, 14192 assertions, 14 failures, 10 errors, 3 skips
4854 runs, 14186 assertions, 13 failures, 13 errors, 3 skips
4854 runs, 14186 assertions, 13 failures, 13 errors, 3 skips
4854 runs, 14184 assertions, 14 failures, 13 errors, 3 skips
4856 runs, 14183 assertions, 17 failures, 13 errors, 3 skips
View color.html
<h3 itemprop="color">Red</h3>
View foo.html
<div class="pc-Show-header">
<h1 itemprop="name">
Next Level Jersey T-shirt
</h1>
<h3 itemprop="color" style="display:none;">
Light Pink
</h3>
</div>
View error.html
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
View gist:15ca7c5503947bf5821eb9d517835295
[00:00:00] Build started
[00:00:00] SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
[00:00:00] SET PATH=C:\MinGW\msys\1.0\bin;%PATH%
[00:00:00] SET RAKEOPT=-rdevkit
[00:00:00] git clone -q --depth=5 --branch=freetds-1.0rc1 https://github.com/rails-sqlserver/tiny_tds.git C:\projects\tiny-tds
[00:00:02] git checkout -qf 68bd9ee6f2bbb71f6db0b61a9682f05e028c3d21
[00:00:02] Running Install scripts
[00:00:02] Update-AppveyorBuild -Version "$(Get-Content $env:appveyor_build_folder\VERSION).$env:appveyor_build_number"
[00:00:03] ruby --version
[00:00:03] ruby 2.0.0p648 (2015-12-16) [i386-mingw32]
You can’t perform that action at this time.