Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastiaan Hoejenbos Sebfh

View GitHub Profile
View gist:a71b47ad4fb20b01165e
$urlRouterProvider.when('/admin', '/admin/dashboard');
$stateProvider
.state('root', {
abstract: true,
url: '',
views: {
'main-layout': {
templateUrl: '/views/layouts/main.html'
}
@Sebfh
Sebfh / simplewebserver
Last active Jun 19, 2019
simple webserver on OSX
View simplewebserver
$ cd intofolder
$ python -m SimpleHTTPServer
View Umbraco-debug.md

Debugging in Umbraco

Debugging in Umbraco is a hell...

Web.config

<add key="umbracoDebugMode" value="true" /> in web.config

Query string

?umbDebugShowTrace=true to url of the page
@Sebfh
Sebfh / find_storedprocedure
Last active Dec 11, 2015
TSQL: Find stored procedures that contain a string of text
View find_storedprocedure
SELECT B.Name, *
FROM syscomments A INNER JOIN sysobjects B
ON A.id = B.id
WHERE A.text like '%yourtext%'
@Sebfh
Sebfh / gist:4585872
Last active Sep 26, 2018
javascript number to currency á la rails
View gist:4585872
function number_to_currency(number, options) {
try {
var options = options || {};
var precision = options["precision"] || 2;
var unit = options["unit"] || "\u20AC";
var separator = precision > 0 ? options["separator"] || "." : "";
var delimiter = options["delimiter"] || ",";
var parts = parseFloat(number).toFixed(precision).split('.');
return unit + number_with_delimiter(parts[0], delimiter) + separator + parts[1].toString();
@Sebfh
Sebfh / rvm2rbenv.txt
Created Jun 6, 2012 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
View rvm2rbenv.txt
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
View gist:2006275
declare @message nvarchar(250)
DECLARE #cursor_name# CURSOR FOR
#select_statement#
OPEN #cursor_name#;
FETCH NEXT FROM #cursor_name#
INTO @#variable#;
WHILE @@FETCH_STATUS = 0
BEGIN