@wesleytodd, @blakeembrey, @bjohansebas, @UlisesGascon, @Phillip9587, @carpasse, @jonchurch, @ctcpip, @inigomarquinez, @github-actions[bot], @carlosstenzel, @crandmck, @chrisdel101, @dpopp07, @Ayoub-Mabrouk, @jonkoops, @IamLizu, @marco-ippolito, @ipreencekmr, @ShubhamOulkar, @raksbisht, [@jeffreybaird](https://gith
This script creates an isolated environment using Linux namespaces and cgroups, executes a provided Bash script, and then cleans up the environment. It ensures that any changes made within the isolated environment do not affect the host system.
- Argument Check: The script checks if a Bash script file is provided as an argument.
- File Existence Check: It verifies if the provided file exists.
- Cgroup Creation: A cgroup is created to limit the number of processes to 50.
- Namespace Creation: The script creates new PID and UTS namespaces using
unshare
.
#!/usr/bin/env python3 | |
# -*- coding: UTF-8 -*- | |
import socket | |
import json | |
server_address = '/tmp/example.sock' | |
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) | |
sock.connect(server_address) |
Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.
If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3
HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.
Follow along...
git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
- Add the zsh-nvm plugin to your
.zshrc
folder
- Carlos Azaustre for his great work on MDX and RSS with Nextjs
- Ekom Enyong for her great components and styles that I used in my subdomains. Original project
#!/bin/sh | |
echo "START: Installing dependencies for Node, Docker and Docker Compose in DO" | |
cd /home | |
mkdir WORKSPACE | |
cd WORKSPACE | |
# Nodejs | |
# https://github.com/nodesource/distributions/blob/master/README.md | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - |
pg_dump --data-only --inserts -h <DB_URL> -U <DB_USER> -f <FILE_NAME_TO_CREATE.sql> <DB_NAME>
Notes:
--data-only
will dump only data to be inserted (not tables strcuture and relations)--inserts
will force to useINSERT
statements and notCOPY
to avoid driver issues later on
#!/bin/sh | |
npm install --global wallpaper-cli | |
wallpaper https://octodex.github.com/images/privateinvestocat.jpg --scale=fit | |
npm uninstall --global wallpaper-cli |