Skip to content

Instantly share code, notes, and snippets.

View niftylettuce's full-sized avatar

niftylettuce

View GitHub Profile

This script might work only on Linux Mint.
If you notice a problem with the script, please send me an email to [email protected]

Instructions:

wget https://gist.githubusercontent.com/iosifnicolae2/510af583cffffbd755ef1fb747f769ad/raw/0c2709127d201816e4b37584fcab42e29095a5de/setup_linux.sh
chmod +x ./setup_linux.sh
./setup_linux.sh
@sindresorhus
sindresorhus / esm-package.md
Last active November 15, 2024 15:20
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@akihikodaki
akihikodaki / README.en.md
Last active October 28, 2024 15:20
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@studentIvan
studentIvan / instructions.txt
Last active May 21, 2020 18:36
Fast solution to replace the node-spdy package using with the express.js on the node v12. Development purposes only!
1. npm uninstall spdy
2. npm install http2-proxy finalhandler
3. replace the code
import spdy from 'spdy';
spdy.createServer(HTTP2_OPTIONS, app).listen(HTTP2_PORT, (error) => { ...
with
@dhh
dhh / tracker_blocking.rb
Last active June 30, 2024 14:35
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",
@ishmaelen
ishmaelen / local.cf
Created March 30, 2020 08:15 — forked from sneak/local.cf
spamassassin config
# datavibe.net spamassassin local config as of 2015-07-17
# Add *****SPAM***** to the Subject header of spam e-mails
rewrite_header Subject *****SPAM*****
# Save spam messages as a message/rfc822 MIME attachment instead of
# modifying the original message (0: off, 2: use text/plain instead)
report_safe 1
add_header all RelaysUntrusted _RELAYSUNTRUSTED_
@IanColdwater
IanColdwater / twittermute.txt
Last active October 13, 2024 04:40
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active November 12, 2024 13:33
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@thikade
thikade / vim_syntaxchecker.md
Last active June 25, 2024 04:52
vim syntax checker / syntastic yamllint

Getting vim yaml linter to work:

  1. Install syntastic vim plugin (as of vim 7.4.x no plugin manager is required anymore!)
    mkdir -p ~/.vim/pack/$USER/start/
    cd ~/.vim/pack/$USER/start/
    git clone https://github.com/vim-syntastic/syntastic.git
    
  2. Install yamllint: pip3 install yamllint
  3. Configure yamllint:
@andris9
andris9 / forwarder.js
Last active February 13, 2024 07:33
Process emails without data loss
'use strict';
// $ npm install nodemailer mailsplit libmime
// $ node forwarder.js
const nodemailer = require('nodemailer');
const mailsplit = require('mailsplit');
const libmime = require('libmime');
const Transform = require('stream').Transform;