Skip to content

Instantly share code, notes, and snippets.

@noprompt
noprompt / word-re.txt
Last active May 2, 2016 15:30
Regular expression for matching any word in `/usr/share/dict/words`.
This file has been truncated, but you can view the full file.
@porqz
porqz / commands.sh
Last active February 13, 2020 12:10
Some useful shell commands (including macOS specialized)
# Current weather and forecast
curl http://wttr.in/
# ASCII Star Wars
nc towel.blinkenlights.nl 23
# or
telnet towel.blinkenlights.nl
# Turn off Mac’s startup sound
sudo nvram SystemAudioVolume=%80
@sergejmueller
sergejmueller / ttf2woff2.md
Last active November 15, 2025 22:07
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@drzhbe
drzhbe / trnslt.js
Last active January 20, 2020 03:57
Click on english word to translate it into russian. Translation will be logged into console.
/**
* <a href='http://api.yandex.ru/dictionary/'>Реализовано с помощью сервиса «API «Яндекс.Словарь»</a>
*/
(function() {
const YANDEX_DICTIONARY_KEY = 'dict.1.1.20150130T172350Z.0895b15babe24c90.431f35fa9af476be1b6d14d80f3809ab693a5970';
const DICTIONARY_URL = `https://dictionary.yandex.net/api/v1/dicservice.json/lookup?key=${YANDEX_DICTIONARY_KEY}&lang=en-ru`
function translate(word) {
fetch(`${DICTIONARY_URL}&text=${word}`)
.then(res => res.json())
@btroncone
btroncone / rxjs_operators_by_example.md
Last active May 3, 2026 02:38
RxJS 5 Operators By Example
@eriknomitch
eriknomitch / transmission-daemon-quickstart.md
Last active July 12, 2026 04:19
Transmission Daemon (transmission-daemon) Quickstart

Transmission Daemon (transmission-daemon) Quickstart

This should work for Debian or Debian-deriviants (e.g., Ubuntu)

Quickstart

Install transmission-daemon

sudo apt-get install transmission-daemon
import {
Directive, TemplateRef, Input, ChangeDetectorRef, ViewContainerRef,
IterableDiffers, OnChanges, SimpleChanges, SimpleChange
} from '@angular/core';
import { NgFor } from "@angular/common";
import { NgForRow } from "@angular/common/src/directives/ng_for";
@Directive({
selector: '[ngFor][ngForIn]'
})

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@EvanBacon
EvanBacon / apple-touch-startup-image.html
Created April 17, 2019 07:10
An example of full iOS PWA startup image (splash screen) support.
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Expo" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link
rel="apple-touch-icon"
sizes="180x180"