Skip to content

Instantly share code, notes, and snippets.

View neuthral's full-sized avatar
🦌
bubbling

neuthral neuthral

🦌
bubbling
  • Finland
View GitHub Profile
@andkirby
andkirby / slack.sh
Last active January 29, 2024 20:08
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@ruario
ruario / h264-vivaldi-linux.md
Last active March 18, 2023 11:17
How to enable HTML5 MP4 (H.264/AAC) video in Vivaldi for Linux, via an alternative FFMpeg library
["Life isn’t about getting and having, it’s about giving and being.", "Kevin Kruse"]
["Whatever the mind of man can conceive and believe, it can achieve.", "Napoleon Hill"]
["Strive not to be a success, but rather to be of value.", "Albert Einstein"]
["Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.", "Robert Frost"]
["I attribute my success to this: I never gave or took any excuse.", "Florence Nightingale"]
["You miss 100% of the shots you don’t take.", "Wayne Gretzky"]
["I’ve missed more than 9000 shots in my career. I’ve lost almost 300 games. 26 times I’ve been trusted to take the game winning shot and missed. I’ve failed over and over and over again in my life. And that is why I succeed.", "Michael Jordan"]
["The most difficult thing is the decision to act, the rest is merely tenacity.", "Amelia Earhart"]
["Every strike brings me closer to the next home run.", "Babe Ruth"]
["Definiteness of purpose is the starting point of all achievement.", "W.
@mullnerz
mullnerz / archive-website.md
Last active February 23, 2024 18:11
Archiving a website with wget

The command I use to archive a single website

wget -mpck --html-extension --user-agent="" -e robots=off --wait 1 -P . www.foo.com

Explanation of the parameters used

  • -m (Mirror) Turns on mirror-friendly settings like infinite recursion depth, timestamps, etc.
@bingeboy
bingeboy / app.js
Last active April 29, 2021 15:52
Upload and display image with NodeJS and Express.
/*
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, common = require('./routes/common')
, fs = require('fs')
, http = require('http')
, util = require('util')
@johntyree
johntyree / getBlockLists.sh
Last active March 9, 2024 12:32
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 28, 2024 11:13
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@chetan
chetan / videbcontrol.sh
Created November 30, 2011 20:25
bash script for modifying .deb dependencies (debian control file)
#!/bin/bash
# usage: save as 'videbcontrol.sh'; chmod 755 videbcontrol.sh; ./videbcontrol.sh foo.deb
#
# from: http://ubuntuforums.org/showthread.php?t=636724
if [[ -z "$1" ]]; then
echo "Syntax: $0 debfile"
exit 1
fi
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh