Skip to content

Instantly share code, notes, and snippets.

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
Import-Module PSReadLine
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
niftycode /
Created May 12, 2021 07:29
Download and unzip a ZIP file using Python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
Download and unzip a ZIP file
Version: 1.0
Python 3.7+
Date created: May 12th, 2021
Date modified: -
pirate /
Last active June 13, 2024 19:49
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
mmanske3D /
Last active June 13, 2024 19:48
Divergent 3D Full-Stack Developer Coding Exercise


For this exercise, you can use any JS/TS libraries, frameworks or build systems that you’d like. The end result should be a functional web page that we can either run or build locally that will demonstrate a working example of the prompt. Code should be shared as a GitHub repository.

If you have any questions or clarification about the prompt, please make your best educated guess about what the user might be asking for and make note of those assumptions. Conversation about your interpretations & possible edge-cases is as important as the quality of the code. Also, the usability of your interface is much more important than the aesthetics.

For the exercise, stand-up a web application and the requested functionality for the component described below. Concentrate on the functionality of the component itself, and unit testing. This exercise is intended to be the start of a larger conversation, so be prepared to discuss any decisions or functionality.


huksley /
Last active June 13, 2024 19:44
Raspberry PI OS Lite configure kiosk - shows multiple web pages as chrome tabs and rotates between them
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install --no-install-recommends -y xserver-xorg xinit x11-xserver-utils
sudo apt-get install -y chromium-browser matchbox-window-manager xautomation unclutter xdotool
sudo tee /boot/ <<EOF
xset -dpms # disable DPMS (Energy Star) features.
xset s off # disable screen saver
xset s noblank # don't blank the video device
anonymous / .bashrc
Created September 27, 2016 19:19
How to change cursor shape, color, and blinkrate of Linux Console
# pretty prompt and font colors
# alter the default colors to make them a bit prettier
echo -en "\e]P0000000" #black
echo -en "\e]P1D75F5F" #darkred
echo -en "\e]P287AF5F" #darkgreen
echo -en "\e]P3D7AF87" #brown
echo -en "\e]P48787AF" #darkblue
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface list member
add interface=ether1 list=WAN
/ip firewall address-list
add address= list=Bogon
add address= list=Bogon
mvidaldp /
Created April 11, 2022 12:43
SD card formating fix via ADB shell when Android GUI fails (internal, portable/external or mixed). Works on Retroid Pocket 2+

I wrote this short tutorial because extending my internal storage using my new micro SD card on my Retroid Pocket 2+ failed all the time. Only setting it up as portable/external worked. However, this instructions should work in any Android 5.0+ device.

So, in case you have problems setting up your SD card on your Android device via graphical interface (setting up storage as extended internal memory or portable), and you get a corrupted SD card or any other error, follow these steps to fix it via adb shell:

  1. Make sure you have adb access to your Android device: Settings > System > About, touch/click on Build number until Developer options are enabled:
  2. Go to Settings > System > Developer options and enable USB debugging.
  3. Assuming you have adb installed on your remote terminal run the following:

adb shell

LondheShubham153 /
Last active June 13, 2024 19:10
This Gist contains all the useful Git Commands

Git Commands

This Gist contains all the useful commands for Git

Build Status

Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.

If you are a developer and want to keep every version of your code/project (which you would most certainly want to), a Version Control System (VCS) is a very wise thing to use.

  • All the commands used for Git
luizomf /
Last active June 13, 2024 19:01
Useful Linux/Unix commands.

Se você usa MacOS

O macOs roda sobre Darwin OS (kernel XNU), que é um sistema UNIX-like. Então, todos os comandos abaixo também funcionam normalmente no MacOS. Recomendo utilizar o gerenciador de pacotes homebrew caso necessário instalar algo. Se quiser o mesmo terminal que eu (ZSH com Oh My ZSH), utilize este vídeo para configurar

Se você usa Windows

No Windows é possível utilizar o wsl2 e instalar uma versão do linux para acompanhar. Eu fiz alguns vídeos para você usar o Linux no Windows.