This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stretch | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
curl \ | |
wget \ | |
zip \ | |
git \ | |
unzip && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
apt-get clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { NgbDateParserFormatter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; | |
@Injectable() | |
export class NgbDateUKParserFormatter extends NgbDateParserFormatter { | |
parse(value: string): NgbDateStruct { | |
if (value) { | |
const dateParts = value.trim().split('/'); | |
if (dateParts.length === 1 && isNumber(dateParts[0])) { | |
return {year: toInteger(dateParts[0]), month: null, day: null}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgbDateAdapter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; | |
import { Injectable } from '@angular/core'; | |
import * as moment from 'moment'; | |
// Might need to polyfill depending on needed browser support... | |
const isInt = Number.isInteger; | |
@Injectable() | |
export class NgbMomentjsAdapter extends NgbDateAdapter<moment.Moment> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Tildes Aplha Extended | |
// @namespace https://tildes.net/ | |
// @version 0.1 | |
// @description Simple QoL improvements while they are developed in the source code | |
// @author Tildes Users | |
// @match https://tildes.net/* | |
// @require https://code.jquery.com/jquery-3.3.1.min.js | |
// @grant GM_addStyle | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* usage example */ | |
/* <div class="mt-5"></div> --> Set div with margin-top: 5px */ | |
/* <div class="m-5"></div> --> Set div with margin: 5px */ | |
/* <div class="my-5"></div> --> Set div with margin-top: 5px, margin-bottom: 5px */ | |
/* Spacing Helpers */ | |
$spaces: (1, 2, 3, 4, 5, 10, 15, 20, 25, 30); | |
$sides: ('t', 'b', 'l', 'r', 'x', 'y', ''); | |
@each $space in $spaces { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p host=host Address: | |
set logfile=Log_%host%.log | |
echo Target Host = %host% >%logfile% | |
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping) | |
:Ping | |
for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do ( | |
echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile% |