Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
const apiUrl = "https://pass.telekom.de/api/service/generic/v1/status" | |
let widget = await createWidget() | |
widget.backgroundColor = new Color("#777777") | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) | |
Script.complete() |
# ------------------------------------------------ | |
# Config files are located in /etc/wireguard/wg0 | |
# ------------------------------------------------ | |
# ---------- Server Config ---------- | |
[Interface] | |
Address = 10.10.0.1/24 # IPV4 CIDR | |
Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
name: CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: |
""" | |
test commit creation with pygit2 | |
To see the result: | |
rm -rf foo && python test_cc.py && cd foo/ && git log --graph --oneline --date-order --decorate --color --all && git status && cd .. | |
""" | |
import os | |
import sys | |
import pygit2 |
My iTunes Match Track upgrading and process info: | |
If you have less than 25,000 tracks: | |
1. First let iTunes Match do its things and find all possible matches in your library and finish uploading any non-matching tracks. | |
2. Once its done, make a new Smart Playlist (I made a folder for all my Smart iTunes Match Related Playlists) | |
Name this one: iCloud-Upgradeable | |
Criteria: | |
MATCH ALL: | |
Bit Rate is less than 256kbps |
from django.db import models, connection | |
class SearchQuerySet(models.query.QuerySet): | |
"""SearchQuerySet""" | |
def __init__(self, model=None, fields=None, using=None, query=None): | |
super(SearchQuerySet, self).__init__(model, query, using) | |
self._search_fields = fields | |
def search(self, squery): |
# Usage: redis-cli publish message hello | |
require 'sinatra' | |
require 'redis' | |
conns = [] | |
get '/' do | |
erb :index | |
end |
function sendData(url, data, onSuccess, onError) { | |
$.ajax({ | |
url: url, | |
type: 'POST', | |
data: data, | |
dataType: 'json', | |
xhrFields: { | |
withCredentials: true | |
}, |