Skip to content

Instantly share code, notes, and snippets.

@halsader
halsader / cloudSettings
Created June 2, 2020 12:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-02T12:25:02.459Z","extensionVersion":"v3.4.3"}
@halsader
halsader / angular-mock-backend.js
Created November 30, 2016 13:04 — forked from kennethlynne/angular-mock-backend.js
High fidelity prototyping using a mock back-end. Include angular-mocks in your script includes after angular. Demo: http://codepen.io/kennethlynne/pen/lJbce
'use strict';
angular.module('yourApp')
.constant('Config', {
viewDir: 'views/',
API: {
useMocks: true,
fakeDelay: 2000,
protocol: window.location.protocol.split(':')[0],
host: window.location.hostname,
DELIMITER |
CREATE FUNCTION uuid_from_bin(b BINARY(16))
RETURNS CHAR(36) DETERMINISTIC
BEGIN
DECLARE hex CHAR(32);
SET hex = HEX(b);
RETURN LOWER(CONCAT(LEFT(hex, 8), '-', MID(hex, 9,4), '-', MID(hex, 13,4), '-', MID(hex, 17,4), '-', RIGHT(hex, 12)));
END
|
@halsader
halsader / chosen-bootstrap.scss
Created July 26, 2016 08:50 — forked from thecristen/chosen-bootstrap.scss
Bootstrap 3.0 theme for Chosen
// Customized styles for select boxes using the Chosen jQuery plugin
// forked from Bootstrap-themed version at https://gist.github.com/koenpunt/6424137
// This one uses your variables from bootstrap-sass
// by thecristen, at https://gist.github.com/thecristen/e71ed5391fbdc6d63dc3 (no license go nuts)
// TODO: This only covers single select
select.form-control + .chosen-container.chosen-container-single .chosen-single {
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075));
@include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
display: block;
@halsader
halsader / FileActionResult.cs
Created November 10, 2015 11:24 — forked from savitskiyan/FileActionResult.cs
ASP.NET MVC 6 WebAPI support partial download file
public sealed class FileActionResult : IActionResult
{
public const int BufferSize = ushort.MaxValue;
private readonly string _filename;
private readonly string _contentType;
public FileActionResult(string filename, string contentType)
{