Skip to content

Instantly share code, notes, and snippets.

@fomightez
fomightez / remove blank lines regex.md
Last active June 5, 2024 01:40
remove all blank lines using regular expressions
@frandieguez
frandieguez / speed-up-arch-aur-builds.sh
Created March 27, 2016 19:02
Speed up Archlinux AUR builds: use all cores and disable package compression
#!/usr/bin/env bash
# use all possible cores for subsequent package builds
sed -i 's,#MAKEFLAGS="-j2",MAKEFLAGS="-j$(nproc)",g' /etc/makepkg.conf
# don't compress the packages built here
sed -i "s,PKGEXT='.pkg.tar.xz',PKGEXT='.pkg.tar',g" /etc/makepkg.conf
@drakemccabe
drakemccabe / colorspace_change.bash
Last active March 27, 2023 16:06
Change video color space from bt601 to bt709 using FFMPEG
ffmpeg -i input.mp4 -vf "scale=in_color_matrix=bt601:out_color_matrix=bt709" output.mp4

How to install Node.js applications, if you're not a Node.js developer

While installing a Node.js application isn't difficult in principle, it may still be confusing if you're not used to how the Node.js ecosystem works. This post will tell you how to get the application going, what to expect, and what to do if it doesn't work.

Occasionally an application may have custom installation steps, such as installing special system-wide dependencies; in those cases, you'll want to have a look at the install documentation of the application itself as well. However, most of the time it's safe to assume that the instructions below will work fine.

If the application you want to install is available in your distribution's repositories, then install it through there instead and skip this entire guide; your distribution's package manager will take care of all the dependencies.

Checklist

// ==UserScript==
// @name OFF mass updater user script
// @namespace openfoodfacts.org
// @version 0.1
// @description Mass Editor
// @match https://*.openfoodfacts.org/*
// @exclude https://*.wiki.openfoodfacts.org/*
// @icon http://world.openfoodfacts.org/favicon.ico
// @require http://code.jquery.com/jquery-latest.min.js
// @require http://code.jquery.com/ui/1.12.1/jquery-ui.min.js
using System;
using System.Collections.Generic;
using System.Text;
namespace Hideaway.Common.Communication
{
public class ProtocolReader
{
private byte[] _buffer;
private int position = 0;