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
@bosskovic
bosskovic / example.resx
Created April 9, 2013 09:18
example of RESX/RESW resource file
<?xml version="1.0" encoding="utf-8"?>
<root>
<data name="Common_AuthenicationFailed" xml:space="preserve">
<value>Authentifikation fehlgeschlagen</value>
</data>
<!-- single line comment -->
<data name="Common_Billable" xml:space="preserve">
<value>Verrechenbar</value>
</data>
<!-- multi
import {Sql} from "../providers/Sql";
export class ExamplePage {
constructor(private sql: Sql) {
//sql.query(...);
//...
}
}
@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');
@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'
@overclock11
overclock11 / drag-drop.component.ts
Created July 26, 2018 12:59
Simple drag and drop Angular
import {Component, ElementRef, OnInit, Renderer2, ViewChild} from '@angular/core';
@Component({
selector: 'app-transaction-condition',
styleUrls: ['./transaction-condition.component.css']
template: `
<div class="list" id="list" #list>
<div id="0"
class="item drop-zone"
draggable="true"
@juliandavidmr
juliandavidmr / counterdown.ts
Created December 20, 2019 19:17
Counterdown + RxJS
import { Observable, timer } from "rxjs";
import { map, takeWhile, take } from "rxjs/operators";
export function countdown(minutes: number, delay: number = 0) {
return new Observable<{ display: string; minutes: number; seconds: number, finished: boolean }>(
subscriber => {
timer(delay, 1000)
.pipe(take(minutes * 60))
.pipe(map(v => minutes * 60 - 1 - v))
.pipe(takeWhile(x => x >= 0 && !subscriber.closed))

Projects in progress

Projects that entertain me in my spare time.

  • i18n-editor
  • superconvert
    • Page: Decode base64.
    • Page: Encode base64.
    • Page: Generate random number (allow max/min values).
  • Page: Generate random UUID.
@jleyva
jleyva / client_grades.php
Last active May 7, 2021 23:41
MDL-30085 core get _grades
<?php
// This file is NOT a part of Moodle - http://moodle.org/
//
// This client for Moodle 2 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
/// SETUP - NEED TO BE CHANGED
@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 () {