Skip to content

Instantly share code, notes, and snippets.

@pravnkay
pravnkay / Readme.md
Last active May 14, 2024 08:19
Nprogress - Loading bar for VueJS Router

Installation of Nprogress for VueJS

Install nprogress.

npm install nprogress --save


Add its CSS

@heyalexej
heyalexej / pytz-time-zones.py
Created November 16, 2016 09:14
list of pytz time zones
>>> import pytz
>>>
>>> for tz in pytz.all_timezones:
... print tz
...
...
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
@ky28059
ky28059 / vercel.md
Last active May 14, 2024 08:18
Deploying to Vercel from an organization for free using GitHub actions

This gist was partially inspired by this blog about Next.js Vercel CI with GitHub actions.

The problem

An easy way to deploy and host websites for free is to use GitHub pages. If you've deployed a Next.js project to GitHub pages, you may have used a GitHub action similar to this in the past to automatically redeploy the site when a new commit is pushed:

# gh-pages-merge.yml
name: Deploy to gh-pages on merge
on:
  push:
@TameemS
TameemS / debloatMEmu.md
Last active May 14, 2024 08:17
Debloating & Optimizing MEmu

Inspired by this

More of my guides: Debloating LDPlayer - Debloating Nox (Updated)

Edit 22/8/2021: I have updated MEmu and it seems like it reinstalls the apps and re-enables the services. Repeat steps 5, 7, 8, and 9 if you update MEmu.

Debloating MEmu

In my experience, Nox can be quite slow and choppy, and looks like I'm not the only person with this problem. A lot of people say that MEmu performs better than Nox, and I could agree with that. I have no chopping issues with it so far. But like Nox, there are kinda shady stuff going on.

Rust Error Handling Cheatsheet - Result handling functions

Introduction to Rust error handling

Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.

Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.

Result is defined as Ok or Err. The definition is generic, and both alternatives have

@jan4984
jan4984 / pulseaudio-ffmpeg.md
Last active May 14, 2024 08:16
audio over tcp with pulseaudio and ffmpeg

linux(WSL)

  • 永久启用pulseaudio

/etc/pulse/client.conf

autospawn = yes
@rutcreate
rutcreate / README.md
Last active May 14, 2024 08:15
Install Oracle InstantClient and SQL*Plus from source on Ubuntu 20.04

Download InstantClient

mkdir -p /opt/oracle
cd /opt/oracle
wget https://download.oracle.com/otn_software/linux/instantclient/218000/instantclient-basic-linux.x64-21.8.0.0.0dbru.zip
unzip instantclient-basic-linux.x64-21.8.0.0.0dbru.zip

Download SQLPlus

@0x263b
0x263b / colors.md
Last active May 14, 2024 08:15
Random color from string in javascript

Random color from string in javascript

Consider a list of strings you need to permanently assign a random color.

First you should turn the string into a hash.

var string = "string"
var hash = 0
@thesamesam
thesamesam / xz-backdoor.md
Last active May 14, 2024 08:12
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@xiaolai
xiaolai / markdownhere.css
Created July 2, 2016 12:12
markdown-here-css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
}
pre, code {
font-size: 14px;
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace;