Skip to content

Instantly share code, notes, and snippets.

View MarioBinder's full-sized avatar
:octocat:
.

Mario Binder MarioBinder

:octocat:
.
View GitHub Profile
@MarioBinder
MarioBinder / gist:8aaa4c95c7b0d64a2503ae7d3a30748c
Last active September 16, 2019 05:21
select last change date of procedures
--select last change date of procedures.
SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'P'
ORDER BY modify_date DESC
@MarioBinder
MarioBinder / gist:829eb1dfeab0928019d08df06ff107a0
Last active September 13, 2019 09:40
Send Model with Ajax instead FormCollection

Helper

public static class HTMLHelperExtensions
{
    public static MvcHtmlString ToJson(object obj)
    {
        var serializer = new JavaScriptSerializer();
        return MvcHtmlString.Create(serializer.Serialize(obj));
    }
}
@MarioBinder
MarioBinder / gist:6ec623381af428af850344883230aed6
Last active August 1, 2019 08:20
Error: Node Sass does not yet support your current environment: Windows 64-bit
Uninstall node-sass: npm uninstall node-sass or delete the folder node_modules/node-sass. Delete package-lock.json,
and clean the cache: npm cache clean --force, then do npm update, npm install, npm update.
then again try to install node sass: npm install node-sass.
git fetch origin master
git reset --hard origin/master
@MarioBinder
MarioBinder / update node.js on mac
Created June 17, 2019 17:37
update node.js on mac
npm cache clean -f
npm install -g n
sudo n stable
@MarioBinder
MarioBinder / set.sql.output.in.quotes.sql
Created December 6, 2018 06:37
set sql output in quotes
'"' + replace (replace ([Description], char(10), ''), char(13), '') + '"' as Description
@MarioBinder
MarioBinder / git_remove_ignored_files
Created October 29, 2018 08:44
How to make Git “forget” about a file that was tracked but is now in .gitignore?
git rm -r --cached .
git add .
git commit -am "Remove ignored files"
//via https://stackoverflow.com/a/19095988/119109
@MarioBinder
MarioBinder / index.html
Created August 17, 2018 06:20
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
EXEC sp_addlinkedserver @server='192.168.2.6' -- server hinzufügen
EXEC sp_addlinkedsrvlogin '192.168.2.6', 'false', NULL, 'USER', 'PASSWORD' -- credentials zuweisen
@MarioBinder
MarioBinder / cookieHandling.js
Created April 16, 2018 08:33
Create & Read Cookies
//via: http://clubmate.fi/setting-and-reading-cookies-with-javascript/
// Create cookie
function createCookie(name, value, days) {
var expires;
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
}
else {