Skip to content

Instantly share code, notes, and snippets.

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@wuftymerguftyguff
wuftymerguftyguff / hostAgentStuff.sh
Last active April 18, 2024 09:19
Useful SAP HostAgent commands
#GET A LIST OF INSTANCES
#/usr/sap/hostctrl/exe/saphostctrl -function Listinstances -format Script
#GET A LIST of databases
saphostctrl -nr 99 -function Listdatabases
# manage a db with the host agent
# /usr/sap/hostctrl/exe/saphostctrl -nr 99 -function StopDatabase -dbname NPL -dbtype ada -user sapadm passwd
#query a db with the host agent
@Poiuytrezay1
Poiuytrezay1 / adverse_cleaner.py
Created November 28, 2023 20:20
Remove adversarial noise from images
import numpy as np
import cv2
import os
import argparse
from pathlib import Path
from cv2.ximgproc import guidedFilter
def main(args):
input = Path(args.input_file_or_dir)
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 18, 2024 09:13
国内的 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+

@abelcallejo
abelcallejo / README.md
Last active April 18, 2024 09:13
Create bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@vielhuber
vielhuber / script.sh
Last active April 18, 2024 09:11
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@DanielSWolf
DanielSWolf / Program.cs
Last active April 18, 2024 09:09
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@alexanderlerch
alexanderlerch / data-sets.md
Last active April 18, 2024 09:07
list of MIR datasets
dataset meta data contents with audio
200DrumMachines 7371 one-shots yes
AAM onsets, pitches, instruments, melody instrument, keys, chords, tempo, beats 3000 (artificial) tracks yes
ACM_MIRUM tempo 1410 excerpts (60s) yes
ACPAS aligned audio and scores 2189 performances of 497 scores downloadable
AcousticBrainz-Genre 15-31 genres with 265-745 subgenres audio features for over 2000000 songs no
@keriati
keriati / test.html
Created August 12, 2012 19:31
Detect invalid characters
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.center {
text-align: center;
}
#myInput {
@klo2k
klo2k / gist:fe794f107c11292ba47b4d052c547983
Created February 12, 2022 08:01
Install virt-manager in Windows 11 WSL (qemu, Windows Subsystem for Linux)
# Inside WSL...
# Install virt-manager
sudo apt install -y virt-manager
# Add youself to kvm and libvirt group
sudo usermod --append --groups kvm,libvirt "${USER}"
# Fix-up permission to avoid "Could not access KVM kernel module: Permission denied" error
sudo chown root:kvm /dev/kvm