Skip to content

Instantly share code, notes, and snippets.

View wirtaw's full-sized avatar
:octocat:
I may be slow to respond.

Vladimir Poplavskij wirtaw

:octocat:
I may be slow to respond.
View GitHub Profile
@wirtaw
wirtaw / index.js
Created November 19, 2023 19:13
Time zones
'use strict';
const { faker } = require('@faker-js/faker');
const { DateTime, Settings } = require('luxon');
Settings.defaultZone = "utc";
console.info(`defaultZone zoneName ${DateTime.local().zoneName}`);
const dt = DateTime.local();
@wirtaw
wirtaw / update_ungoogled_chrome.sh
Last active November 2, 2023 16:36
Steps to write update Ungoogled Chrome browser one-command line
#!/bin/bash
# Get latest from releases https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/releases/latest
api_endpoint="https://api.github.com/repos/ungoogled-software/ungoogled-chromium-portablelinux/releases/latest"
# Go to the temp folder
cd /tmp
# Send a GET request to the API endpoint and extract the download URL of the tar.xz archive
archive_url=$(curl -s $api_endpoint | jq -r ".assets[] | select(.content_type | test(\"application/x-xz\")) | .browser_download_url")
@wirtaw
wirtaw / update_postman.sh
Last active November 2, 2023 18:45
Linux shell script to update Postman one-command line
#!/bin/bash
# Go to the
cd /tmp
# Download the latest Postman source archive
wget 'https://dl.pstmn.io/download/latest/linux_64' -O postman.tar.gz
# Extract the Postman source archive
tar -xzf postman.tar.gz -C /tmp/
@wirtaw
wirtaw / update_discord.sh
Last active March 17, 2024 18:16
Linux shell script to update Discord one-command line
#!/bin/bash
# Go to the
cd /tmp
# Download the latest Discord source archive
wget 'https://discord.com/api/download?platform=linux&format=tar.gz' -O discord.tar.gz
# Extract the Discord source archive
tar -xzf discord.tar.gz -C /tmp/
@wirtaw
wirtaw / tor.sh
Last active July 21, 2020 11:49
Shell script to start tor
#!/usr/bin/env bash
# 'Wi-Fi' or 'Ethernet' or 'Display Ethernet'
INTERFACE=Wi-Fi
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).