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
@edrpls
edrpls / init.vim
Last active January 4, 2023 03:00
My neovim config on WSL/Ubuntu
set shell=/bin/sh
set termguicolors
set number
set ruler
set relativenumber
set cursorline
"set synmaxcol=1000
set clipboard=unnamed
"set list listchars=tab:\ ,eol:¬,trail:
@juliandavidmr
juliandavidmr / grammar.jison
Created December 27, 2017 06:16
grammar pseudo language
/* description: Parses end executes mathematical expressions. */
/* lexical grammar */
%lex
%%
\s+ /* skip whitespace */
[0-9]+("."[0-9]+)?\b return 'NUMBER'
"true" return 'TRUE'
"false" return 'FALSE'
@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 26, 2024 05:43
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 () {