Memory | CPU | SSD | Transfer | Price | Sign Up Link |
---|---|---|---|---|---|
1 GB | 1 core | 25 GB | 1 TB | $5/mo. | Get 5 free months |
2 GB | 1 core | 50 GB | 2 TB | $10/mo. | Get 2 free months |
4 GB | 2 cores | 80 GB | 4 TB | $20/mo. | Get 1 free month |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_autocomplete_ssh_host() { | |
local cword hosts | |
cword=${COMP_WORDS[COMP_CWORD]} | |
hosts=$(grep -i '^host ' ~/.ssh/config | cut -c 6- | grep -Fv '*') | |
COMPREPLY=($(compgen -W "$hosts" -- "$cword")) | |
} | |
complete -F _autocomplete_ssh_host ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoIt: Infinite Progress Bar | |
; Source: https://www.autoitscript.com/forum/topic/125697-_progresssetmarquee-startsstops-the-pbs_marquee-style-on-a-progressbar/?do=findComment&comment=874763 | |
#include <GUIConstantsEx.au3> | |
#include <ProgressConstants.au3> | |
Example() | |
Func Example() | |
Local $hGUI = GUICreate('Marquee ProgressBar', 300, 90) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usual `ss -tulpn | column -t` has a broken table header, | |
# this oneliner should solve the issue and prettify output | |
ss -tulpn | sed '1 s/\(Local\|Peer\) Address:Port/\1_Addr:Port /g' | column -t -R3,4,5,6 -W7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @author Habetdin | |
// @name [Steam] Find CL.0R/TH.4X | |
// @version 2022 | |
// @include https://store.steampowered.com/* | |
// @run-at document-end | |
// ==/UserScript== | |
(function() { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function normalizeNumerals($string) { | |
$numerals_ascii = range(0, 9); // Western Arabic | |
$numerals_arabic = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩']; // Eastern Arabic | |
$numerals_bengali = ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯']; // Bengali | |
$numerals_devanagari = ['०', '१', '२', '३', '४', '५', '६', '७', '८', '९']; // Devanagari (Nagari) | |
$numerals_myanmar = ['၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉']; // Myanmar (Burmese) | |
$numerals_persian = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹']; // Persian | |
$string = str_replace($numerals_arabic, $numerals_ascii, $string); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import ipaddress | |
import sys | |
source = [] | |
result = [] | |
for line in sys.stdin.readlines(): | |
source.extend(ipaddress.ip_network(net) for net in line.split()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://unix.stackexchange.com/a/31955 | |
find . -maxdepth 1 -name '*.cpp' -type f -exec sed -i -e '$a\' {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Remove all containers including their volumes | |
docker rm -vf $(docker ps -a -q) | |
# 2. Remove all images | |
docker rmi -f $(docker images -a -q) | |
# (1) and (2) as an one-liner | |
export _DCKR=$(docker ps -a -q) && [ -n "$_DCKR" ] && docker rm -vf ${_DCKR[@]}; export _DCKR=$(docker images -a -q) && [ -n "$_DCKR" ] && docker rmi -f ${_DCKR[@]}; unset _DCKR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Extracts exceptions from log files. | |
# | |
import sys | |
import re | |
from collections import defaultdict | |
REGEX = re.compile("(^\tat |^Caused by: |^\t... \\d+ more)") | |
# Usually, all inner lines of a stack trace will be "at" or "Caused by" lines. |
NewerOlder