Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger
| var system = require('system'), | |
| env = system.env; | |
| /** | |
| * Wait until the test condition is true or a timeout occurs. Useful for waiting | |
| * on a server response or for a ui change (fadeIn, etc.) to occur. | |
| * | |
| * @param testFx javascript condition that evaluates to a boolean, | |
| * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
| * as a callback function. |
| /* | |
| I wasn't able to find a single example on how to actually use Dapper's new TVP, so I though I'd add one. | |
| First of all, you will need to install the Dapper.TVP package from NuGet. | |
| The main item to note is the need to create and populate a list of SqlDataRecords. This is then used to used as part of the | |
| input parameter for Dapper's TableValueParameter. | |
| The API is thus: |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
| var webpack = require('webpack'); | |
| var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| var path = require('path'); | |
| var folders = { | |
| APP: path.resolve(__dirname, '../app'), | |
| BUILD: path.resolve(__dirname, '../build'), | |
| BOWER: path.resolve(__dirname, '../bower_components'), | |
| NPM: path.resolve(__dirname, '../node_modules') | |
| }; |
| // Ensure you always use global App namespace for EVERYTHING. | |
| // This means that at runtime, it doesnt need to search inside namespaces and is 4-8x faster. | |
| namespace App | |
| { | |
| // Always use static classes, DI is bad practice and makes everything slow. | |
| // If you MUST use DI, then ensure you use the container everywhere as a service locator so that it's faster. | |
| public static class God | |
| { | |
| [DebuggerHidden] // Hide, we dont want developers finding this and then trying to optimize it further, only chuck norris could do that. |
| // Version without jQuery | |
| javascript:(function () { var root = angular.element(document.getElementsByTagName('body')); var watchers = []; var f = function (element) { angular.forEach(['$scope', '$isolateScope'], function (scopeProperty) { if (element.data() && element.data().hasOwnProperty(scopeProperty)) { angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) { watchers.push(watcher); }); } }); angular.forEach(element.children(), function (childElement) { f(angular.element(childElement)); }); }; f(root); var watchersWithoutDuplicates = []; angular.forEach(watchers, function(item) { if(watchersWithoutDuplicates.indexOf(item) < 0) { watchersWithoutDuplicates.push(item); } }); console.log(watchersWithoutDuplicates.length); })(); | |
| // Version with jQuery | |
| javascript:(function () { var root = $(document.getElementsByTagName('body')); var watchers = []; var f = function (element) { if (element.data().hasOwnProperty('$scope')) { angular.forEach(element.data().$scope.$$watchers, function (watche |
— by Abhisek Pattnaik <[email protected]>
git clone https://github.com/datasift/gitflow hubflow
cd hubflow| Add-Type -AssemblyName System.IO.Compression.FileSystem | |
| $TEMP = $([environment]::GetEnvironmentVariable("TEMP", "User")) | |
| $CWD = $(Split-Path $MyInvocation.MyCommand.Path) | |
| $PATH = $([environment]::GetEnvironmentVariable("PATH", "User")) | |
| $git_folder = "C:\Program Files\Git" | |
| $git_bin_folder = "$($git_folder)\bin" | |
| $tmp_folder = "$($TEMP)\$([guid]::NewGuid())"; |