A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
# Helper method | |
function StartService($ServiceName) { | |
$arrService = Get-Service -Name $ServiceName | |
while ($arrService.Status -ne 'Running') | |
{ | |
Start-Service $ServiceName | |
write-host $arrService.status | |
write-host 'Service starting' | |
Start-Sleep -seconds 5 |
//Read | |
//BsonDocument | |
var collection = db.GetCollection<BsonDocument>("people"); | |
var builder = Builders<BsonDocument>.Filter; | |
//Note that the '&' '!' '|' operators are overloaded when used in the FilterBuilder | |
var filter = builder.Lt("Age", 33) & !builder.Eq("Name", "Ericsson"); | |
var list = await collection.Find(filter).ToListAsync(); | |
------------------------------------------------------------------------------------ |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var telemetryClient = new TelemetryClient(new TelemetryConfiguration("APP_INSIGHTS_KEY")); | |
var mongoConnectionString = "mongodb://localhost:27017/test"; | |
TrackMongoByEvents(mongoConnectionString, telemetryClient); | |
TrackMongoManually(mongoConnectionString, telemetryClient); |
--- rabbitmq-env-orig.bat Tue Oct 11 12:16:01 2016 | |
+++ rabbitmq-env.bat Tue Oct 11 12:10:18 2016 | |
@@ -1,10 +1,12 @@ | |
@echo off | |
REM Scopes the variables to the current batch file | |
REM setlocal | |
+set /p COOKIE_VALUE=<%HOMEDRIVE%%HOMEPATH%\.erlang.cookie | |
+ |
availabilityResults | |
| where timestamp >= ago(30d) | |
| summarize AvailabilityPercentage=(sum(todouble(success)) / count(success)) * 100, Failures=count(success)-sum(todouble(success)), TotalTests=count(success) by TestName=name | |
| order by Failures asc |
ESC-Refresh-Power
CTRL-D
to erase and install ChromeOS in Developer modeCTRL-ALT-t
sudo sh -e ~/Downloads/crouton -t cli-extra
sudo sh -e crouton -p "/media/removable/USB Drive/" -r trusty -t cli-extra
sudo sh -e crouton -p "/media/removable/USB Drive/" -r trusty -t xfce
sudo /sbin/iptables -A INPUT -p tcp --dport 80 -j ACCEPT
// kills long running ops in MongoDB (taking seconds as an arg to define "long") | |
// attempts to be a bit safer than killing all by excluding replication related operations | |
// and only targeting queries as opposed to commands etc. | |
killLongRunningOps = function(maxSecsRunning) { | |
currOp = db.currentOp(); | |
for (oper in currOp.inprog) { | |
op = currOp.inprog[oper-0]; | |
if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) { | |
print("Killing opId: " + op.opid |
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) { | |
$httpProvider.responseInterceptors.push([ | |
'$q', '$templateCache', 'activeProfile', | |
function($q, $templateCache, activeProfile) { | |
// Keep track which HTML templates have already been modified. | |
var modifiedTemplates = {}; | |
// Tests if there are any keep/omit attributes. | |
var HAS_FLAGS_EXP = /data-(keep|omit)/; |
#!/bin/bash | |
branchname=`git symbolic-ref -q --short HEAD` | |
if [[ $branchname =~ 'tfs-.*' ]]; then | |
workitems=$(echo $branchname | sed s/tfs-//g | tr ',' ' ' ) | |
for workitem in $workitems; | |
do | |
cp $1 $1.old | |
$(sed '1s/^/#git-tfs-work-item: '$workitem' associate\n/' $1.old > $1) |