Skip to content

Instantly share code, notes, and snippets.

View juliandavidmr's full-sized avatar
:octocat:
Working from home

Julian David juliandavidmr

:octocat:
Working from home
View GitHub Profile
@juliandavidmr
juliandavidmr / example.markdown
Created October 25, 2017 00:24
Simple component of Angular 2/4 with QuillJS (wysiwyg)

Example

View

Content html

<wysiwyg (onChangeText)="onChangeText($event)"></wysiwyg>

Content typescript

@juliandavidmr
juliandavidmr / stop_iis_windows.bash
Created October 8, 2017 16:59
Start or Stop the Web Server (IIS 7)
# Stop
net stop WAS
# Start
# net start W3SVC
@haydenbr
haydenbr / cache-busting.js
Created October 5, 2017 17:51
ionic cache busting
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
cheerio = require('cheerio'),
revHash = require('rev-hash');
var rootDir = path.resolve(__dirname, '../');
var wwwRootDir = path.resolve(rootDir, 'platforms', 'browser', 'www');
var buildDir = path.join(wwwRootDir, 'build');
@coco-napky
coco-napky / hyper.js
Created March 8, 2017 23:21
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@juliandavidmr
juliandavidmr / HomeController.cs
Created February 17, 2017 01:07
Implementacion de API OAuth Chaira en MVC Razor C#. Iniciar sesión y obtener información basica del usuario logeado.
using System.Web.Mvc;
using Helpers;
using System.Web.Security;
namespace Project.Controllers {
[AllowAnonymous]
public class HomeController : Controller {
[HttpGet]
@MurhafSousli
MurhafSousli / html-sanitizer.pipe.ts
Last active August 16, 2023 04:08
HTML Dom Sanitizer Pipe
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Pipe({
name: 'sanitizeHtml'
})
export class HtmlSanitizerPipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) {
}
@juliandavidmr
juliandavidmr / Crear.cshtml
Created January 8, 2017 21:03
Mostrar Select (html) con datos a partir de un DataTable en C# & Razor
<div class="">
@Html.LabelFor(model => model.griv_idgrupoinv, htmlAttributes: new { @class = "" })
@Html.DropDownList("griv_idgrupoinv", new SelectList(ViewBag.GrupoInv, "Text", "Value"), new { @class = "form-control" })
</div>
@daliborgogic
daliborgogic / delay.js
Created December 16, 2016 15:26
Node.js Async/Await delay
'use strict'
const timeout = ms => new Promise(res => setTimeout(res, ms))
function convinceMe (convince) {
let unixTime = Math.round(+new Date() / 1000)
console.log(`Delay ${convince} at ${unixTime}`)
}
async function delay () {
@sadikaya
sadikaya / git-bash-in-webstorm.md
Last active February 13, 2024 01:23
git bash inside Webstorm terminal

Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.

for 64bit:

"C:\Program Files\Git\bin\sh.exe" --login -i

for 32bit:

"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
@Frankity
Frankity / main.vala
Created October 7, 2016 01:37 — forked from rickybassom/main.vala
Simple Gtk.Application example in vala
using Gtk;
public class MyApplication : Gtk.Application {
public MyApplication () {
Object(application_id: "testing.my.application",
flags: ApplicationFlags.FLAGS_NONE);
}
protected override void activate () {