As configured in my dotfiles.
start new:
tmux
start new with session name:
/*----------------------------------------------------- | |
960 Grid System ~ Core CSS. | |
Learn more ~ http://960.gs/ | |
Licensed under GPL and MIT. | |
-------------------------------------------------------*/ | |
/* Grid Settings | |
---------------------------*/ | |
// 12-column grid |
[global] | |
server.socket_host: "127.0.0.1" | |
server.socket_port: 8080 | |
log.error_file = '/Users/chb/code/lpn-dot-com/test/log/cherrypy.error.log' | |
log.access_file = '/Users/chb/code/lpn-dot-com/test/log/cherrypy.access.log' | |
[/] | |
tools.staticdir.debug: True | |
tools.staticdir.root: '/Users/chb/code/lpn-dot-com' |
#!/usr/bin/python | |
#code taken from http://www.macdrifter.com/2011/12/python-and-the-mac-clipboard/ | |
def pbcopy(s): | |
"Copy string argument to clipboard" | |
board = AppKit.NSPasteboard.generalPasteboard() | |
board.declareTypes_owner_([AppKit.NSStringPboardType], None) | |
newStr = Foundation.NSString.stringWithString_(s) | |
newData = \ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
SELECT r.session_id,r.command, | |
CONVERT(NUMERIC(6,2),r.percent_complete) | |
AS [Percent Complete],CONVERT(VARCHAR(20),DATEADD(ms,r.estimated_completion_time,GetDate()),20) AS [ETA Completion Time], | |
CONVERT(NUMERIC(10,2),r.total_elapsed_time/1000.0/60.0) AS [Elapsed Min], | |
CONVERT(NUMERIC(10,2),r.estimated_completion_time/1000.0/60.0) AS [ETA Min], | |
CONVERT(NUMERIC(10,2),r.estimated_completion_time/1000.0/60.0/60.0) AS [ETA Hours], | |
CONVERT(VARCHAR(1000),(SELECT SUBSTRING(text,r.statement_start_offset/2, | |
CASE WHEN r.statement_end_offset = -1 THEN 1000 ELSE (r.statement_end_offset-r.statement_start_offset)/2 END) | |
FROM sys.dm_exec_sql_text(sql_handle))) | |
FROM sys.dm_exec_requests r WHERE command IN ('RESTORE DATABASE','BACKUP DATABASE') |
# tar files to a remote destination | |
tar czf - . | ssh remote "( cd /somewhere ; cat > file.tar.gz )" |
USE master; | |
ALTER DATABASE [db_name] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; | |
DROP DATABASE [db_name]; |
$fso = Get-ChildItem -Recurse -path C:\fso | |
$fsoBU = Get-ChildItem -Recurse -path C:\fso_BackUp | |
Compare-Object -ReferenceObject $fso -DifferenceObject $fsoBU |
I hereby claim:
To claim this, I am signing this object:
#include <iostream> | |
#include <stdio.h> | |
#include <limits> | |
int main() | |
{ | |
std::cout << "Integers: \n"; | |
std::cout << "\tType\t\tSize (Bits)\tLowest\t\tMin\t\tMax\n"; | |
std::cout << "____________________________________________________________________________\n"; |