Skip to content

Instantly share code, notes, and snippets.

@voidfiles
voidfiles / posterouss_bookmarklet.js
Created June 2, 2012 22:31
Posterous's Bookmarklet
// Bookmarklet
javascript: var % 20b = document.body;
var % 20POSTEROUS___bookmarklet_domain = 'http://posterous.com';
var % 20d = new % 20Date();
var % 20e = (new % 20Date(d.getFullYear(), d.getMonth(), d.getDate())).getTime();
if (b && !document.xmlVersion) {
void(z = document.createElement('script'));
void(z.type = 'text/javascript');
void(z.src = 'http://posterous.com/javascripts/bookmarklet2.js?' + e);
void(b.appendChild(z));
@axel-op
axel-op / dart-github-actions.md
Last active May 5, 2024 15:17
3 ways to build a GitHub Action with Dart

3 ways to build a GitHub Action with Dart

In 2020, I published the Pub package github_actions_toolkit to write GitHub Actions with Dart more easily. However, GitHub Actions runners don't support natively the Dart language, and some steps are necessary to execute a Dart program in a GitHub Actions workflow.

Below I compare three ways to create a GitHub Action with Dart, with their pros and cons.

. Shared Dart container Isolated Dart container Natively compiled executable
✍️ Defines the environment User Developer Developer
@enkuso
enkuso / A_Mailserver_on_Ubuntu_16.04.md
Last active May 5, 2024 15:17
A Mailserver on Ubuntu 16.04: Postfix, Dovecot, MySQL

Source

Postfix, Dovecot, MySQL – Ex Ratione

This long post contains a recipe for building a reasonably secure Ubuntu 16.04 mail server in Amazon Web Services, using Postfix, Dovecot, and MySQL, with anti-spam packages in the form of amavisd-new, Clam AntiVirus, SpamAssassin, and Postgrey. Local users [are virtual][1] rather than being system users. Administration of users and domains is achieved through the Postfix Admin web interface. Webmail is provided by Roundcube.

This is an updated version of earlier [Ubuntu 12.04][2] and [Ubuntu 14.04][3] mailserver recipes. A number of people graciously helped to fix bugs and make improvements in the original, so should you find a blocking issue here please do let me know.

Introduction

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 5, 2024 15:15
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ruanbekker
ruanbekker / kubernetes_configmaps_env_file.md
Created December 9, 2019 10:51
Create a Kubernetes ConfigMap from a file with environment variables

Create the file with the environment variables:

$ cat envs.txt
HOSTNAME=app.domain.com
PASSWORD=foobar

Create the config map:

@ryanorendorff
ryanorendorff / README.md
Last active May 5, 2024 15:10
reth and lighthouse devnet attempted setup

In this procedure, we are attempting to set up a devnet, which is a blockchain completely local to your machine. Below is the attempted procedure to get it up and running.

In general, believe this is the structure we want:

graph TB;
    reth1[reth execution client]
 lighthouse1[Lighthouse consensus client]
@faceyspacey
faceyspacey / respond-framework_vs_concurrent-react.md
Last active May 5, 2024 15:10
how Respond Framework solves the same stuff as Concurrent React, but better without an API
createModule({
  home: '/',
  login: '/login',
  dashboard: {
    path: '/dashboard',
    module: createModule({
      settings: '/settings',
      myAccount: '/my-account',
    }, {
@jonathasgouv
jonathasgouv / yt-downloader.js
Last active May 5, 2024 15:10
Download array of youtube videos as MP3
const fs = require('fs');
const ytdl = require('ytdl-core');
const sanitize = require("sanitize-filename");
async function downloadVideos(urls) {
try {
for (const url of urls) {
const info = await ytdl.getInfo(url);
const title = info.videoDetails.title;
const filename = sanitize(`${title}.mp3`);
@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup