This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBCC CHECKIDENT (TABLE_NAME, RESEED, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update-Database -ConnectionString "MY_CONNECTION_STRING" -ConnectionProviderName "System.Data.SqlClient" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM information_schema.COLUMNS WHERE column_name like '%[Column_Name]%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC sp_fkeys @fktable_name='[Table_Name]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC sp_fkeys '[Table_Name]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop procedure if exists load_foo_test_data; | |
delimiter # | |
create procedure load_foo_test_data() | |
begin | |
declare v_max int unsigned default 10; | |
declare v_counter int unsigned default 1; | |
declare v_min_rand int unsigned default 1; | |
declare v_max_rand int unsigned default 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- in master (note, you need user to have access to master for proper login/testing) | |
create login [XXXX] with password = 'YYYYY'; | |
create user [XXXX] from login [XXXX]; | |
-- if you want the user to be able to create databases and logins | |
exec sp_addRoleMember 'dbmanager', 'XXXX'; | |
exec sp_addRoleMember 'loginmanager', 'XXXX'; | |
-- in each individual database, to grant dbo | |
create user [XXXX] from login [XXXX]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
From: http://css-tricks.com/responsive-data-tables/ | |
Max width before this PARTICULAR table gets nasty | |
This query will take effect for any screen smaller than 760px | |
and also iPads specifically. | |
*/ | |
@media | |
only screen and (max-width: 760px), | |
(min-device-width: 768px) and (max-device-width: 1024px) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -u username -p database_name < file.sql |