+ this will be highlighted in green
- this will be highlighted in red
Inline colors? diff - red
Probably doesn't work
const euroCountries = [ | |
'BE', // Belgique/België Belgium Belgique Belgien | |
'BG', // Bulgarija Bulgaria Bulgarie Bulgarien | |
'CZ', // Česko Czechia Tchéquie Tschechien | |
'DK', // Danmark Denmark Danemark Dänemark | |
'DE', // Deutschland Germany Allemagne Deutschland | |
'EE', // Eesti Estonia Estonie Estland | |
'IE', // Éire/Ireland Ireland Irlande Irland | |
'EL', // Elláda Greece Grèce Griechenland | |
'ES', // España Spain Espagne Spanien |
// Dependency: CountUp.js: https://github.com/inorganik/CountUp.js | |
(function ($) { | |
$.fn.countup = function (params) { | |
// make sure dependency is present | |
if (typeof CountUp !== 'function') { | |
console.error('countUp.js is a required dependency of countUp-jquery.js.'); | |
return; | |
} |
import { Directive, ElementRef, OnInit, Input, HostListener } from '@angular/core'; | |
import { confetti } from 'dom-confetti'; | |
interface ConfettiConfig { | |
angle: number; // - direction of the explosion in degrees, defaults to 90. | |
spread: number; // - spread of the explosion in degrees, deafults to 45. | |
startVelocity: number; // - Initial velocity of the particles, defaults to 45. | |
width: number; // - width of the confetti elements | |
height: number; // - height of the confetti elements | |
elementCount: number; // - Number of particle elements, defaults to 50. |
/* These are methods extracted from a singleton class i used called | |
"TungCommonObjects". I didn't include the properties just | |
the methods concerned with playing and caching audio. | |
This file acted as NSURLConnectionDataDelegate, AVAssetResourceLoaderDelegate. | |
It is broken into the following parts, separated by pragma marks. | |
- Player Instance methods | |
- caching/saving episodes | |
- NSURLConnection delegate |
{"lastUpload":"2018-10-15T22:15:03.430Z","extensionVersion":"v3.1.2"} |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
enter_directory() { | |
if [[ $PWD == $PREV_PWD ]]; then | |
return | |
fi | |
PREV_PWD=$PWD |
import { Component } from '@angular/core'; | |
import { FormControl, Validators } from '@angular/forms'; | |
import { HttpClient, HttpParams } from '@angular/common/http'; | |
interface MailChimpResponse { | |
result: string; | |
msg: string; | |
} | |
@Component({ |
+ this will be highlighted in green
- this will be highlighted in red
Inline colors? diff - red
Probably doesn't work
func getImageDataWithUrlString(imageUrlString: String) -> NSData? { | |
let url = URL(string: imageUrlString) | |
if let filename: String = url?.lastPathComponent { | |
let imagesDirUrl = try! FileManager.default.url(for: .cachesDirectory, in: .localDomainMask, appropriateFor: nil, create: true) | |
let fileUrl = imagesDirUrl.appendingPathComponent(filename) | |
do { | |
// get a cached copy | |
let _ = try fileUrl.checkResourceIsReachable() | |
let imageData = NSData(contentsOf: fileUrl) |
// smash Medium's clap button the max number of times | |
function simulateClick(node) { | |
var md = document.createEvent('MouseEvents'); | |
md.initEvent('mousedown', true, false); | |
node.dispatchEvent(md); | |
var mu = document.createEvent('MouseEvents'); | |
mu.initEvent('mouseup', true, false); | |
node.dispatchEvent(mu); | |
} |