Skip to content

Instantly share code, notes, and snippets.

@lopspower
lopspower / README.md
Last active May 11, 2024 06:59
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@jdah
jdah / .vimrc
Created June 14, 2021 11:54
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
@packerdl
packerdl / lxc_plex_intel_quicksync.md
Last active May 11, 2024 06:55
Intel QuickSync passthrough to an unprivileged LXC container running plex.

Running Plex in an Unprivileged LXC with Intel QuickSync Passthrough

First setup an unprivileged Ubuntu container with Plex Media Server installed. Inside the container take note of the id of the plex group.

# Your Plex group's ID may be different
$ getent group plex | cut -d : -f3
998
@bindiego
bindiego / vscode-server-update.md
Created November 9, 2023 02:43
Manually install vscode on server side

First of all, open the vscode editor and check the commit version from "About Visual Studio Code" tab, it should be something like 2b35e1e6d88f1ce073683991d1eff5284a32690f.

Save the bellow script and pass it the commit code to run will do the job.

#!/bin/bash

code_server=~/vscode-server-linux-x64.tar.gz

curl -L https://update.code.visualstudio.com/commit:${@}/server-linux-x64/stable > $code_server
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 11, 2024 06:50
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@rocarvaj
rocarvaj / .vimrc
Created April 27, 2012 21:28
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
@RobTrew
RobTrew / ParseAllOPMLAttributes.js
Last active May 11, 2024 06:49
PARSE LOCAL OPML FILE IN OS X 10.10 JXA USING $.NSXMLDocument (parsing 'text' + all other attributes)
// PARSE LOCAL OPML FILE IN OS X 10.10 JXA USING $.NSXMLDocument
// Ver 2.0 Parse all attributes (ver 1 just parsed text)
function run() {
var app = Application.currentApplication();
app.includeStandardAdditions = true;
function readTextFromFile(strPath) {
return $.NSString.stringWithContentsOfFile(strPath);
}
@2E0PGS
2E0PGS / linux-usb-file-copy-fix.md
Last active May 11, 2024 06:48
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

@popravich
popravich / PostgreSQL_index_naming.rst
Last active May 11, 2024 06:47
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;