Skip to content

Instantly share code, notes, and snippets.

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@NeilRobbins
NeilRobbins / gist:2226646
Created March 28, 2012 14:31
Backup, Restore, then delete a Database
Import-Module “sqlps” -DisableNameChecking
Set-Location SQLSERVER:\SQL\<MachineName>\<InstanceName>
Backup-SqlDatabase -ServerInstance <MachineName> -Database <NameOfDatabaseToCopy> -BackupFile <PathOfDirToStoreBak>\<BackupName>.bak
$RelocateData = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile(<NameOfDataFile>, "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\<NameOfDataFile>_COPY.mdf")
$RelocateLog = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("<NameOfDataFile>_log", "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\<NameOfDataFile>_COPY.ldf")
Restore-SqlDatabase -ServerInstance <MachineName>\<InstanceName> -Database <NameOfDatabaseToCopy> -BackupFile <PathOfDirToStoreBak>\<BackupName>.bak -RelocateFile @($RelocateData,$RelocateLog)
Invoke-Sqlcmd -Query "ALTER DATABASE <NameOfDatabaseToCopy> SET SINGLE_USER WITH ROLLBACK IMMEDIATE" -QueryTimeout 65534
Invoke-Sqlcmd -Query "DROP DATABASE <NameOfDatabaseToCopy>" -QueryTimeout 65534