Skip to content

Instantly share code, notes, and snippets.

@risyasin
risyasin / amdgpu-reset.patch
Created March 29, 2020 17:20
amdgpu-reset.patch
From 1a723fd375a530781d344a1315c55467ae9dbb1f Mon Sep 17 00:00:00 2001
From: Geoffrey McRae <geoff@hostfission.com>
Date: Wed, 27 Nov 2019 00:32:23 +1100
Subject: [PATCH] quirk: AMD Navi 10 series vendor specific reset (v2)
Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
---
drivers/pci/quirks.c | 132 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>DATA_DIR</key>
<string>/usr/local/var/dgraph</string>
</dict>
<key>Label</key>
@risyasin
risyasin / check-syscoin-seed-nodes.sh
Created September 12, 2019 13:49
Syscoin seed node port checker
#!/bin/bash
echo "Checking 18.204.236.41" && nmap 18.204.236.41 | grep open
echo "Checking 116.203.90.92" && nmap 116.203.90.92 | grep open
echo "Checking 116.203.189.147" && nmap 116.203.189.147 | grep open
echo "Checking 159.69.25.31" && nmap 159.69.25.31 | grep open
echo "Checking 159.69.196.145" && nmap 159.69.196.145 | grep open
echo "Checking 159.69.201.152" && nmap 159.69.201.152 | grep open
echo "Checking 159.69.203.214" && nmap 159.69.203.214 | grep open
echo "Checking 178.157.82.70" && nmap 178.157.82.70 | grep open
@risyasin
risyasin / build-nginx.sh
Last active August 8, 2020 09:28
Ubuntu 18 Nginx compile with ModSecurity + ModPageSpeed + Headers + Cache purge with Threads support
#!/usr/bin/env bash
set -e
# http://nginx.org/download/nginx-1.16.0.tar.gz
SRC_ROOT=/usr/src
NSRC_ROOT=/usr/src/nginx
NPS_VERSION=1.13.35.2
NGINX_VERSION=1.16.1
@risyasin
risyasin / build-php.sh
Last active December 20, 2019 06:50
Ubuntu 18 PHP compile Pear + DB4 + Argon for AWS "A" instances
#!/bin/bash
### Builds PHP from source on Ubuntu 18
set -e
echo "Prepairing build tools"
DEBIAN_FRONTEND=noninteractive apt update -y && apt install -y build-essential \
bison autoconf bison re2c pkg-config libsystemd-dev libxml2-dev \
libssl-dev libsqlite3-dev libcurl4-openssl-dev libcurl4 \
unzip libenchant-dev libffi-dev libpng-dev libgmp-dev libonig-dev \
libpq-dev libedit-dev librecode-dev libargon2-0-dev libzip-dev
@risyasin
risyasin / conf
Created July 22, 2017 11:09
elasticsearch systemd unit
[Unit]
Description=Elasticsearch
Documentation=http://www.elastic.co
Wants=network-online.target
After=network-online.target
[Service]
Environment=ES_HOME=/usr/share/elasticsearch
Environment=CONF_DIR=/etc/elasticsearch
Environment=DATA_DIR=/var/lib/elasticsearch
@risyasin
risyasin / xmlformatf.py
Created October 26, 2016 06:42
Large XML file format/lint wrapper (xmllint)
#!/usr/bin/python2.7
import os
import sys
import fnmatch
import subprocess
import traceback
# whichever directory is running on.
cwd = os.getcwd()
@risyasin
risyasin / arch-vm-install.sh
Created July 18, 2016 20:41
Arch Linux Virtualbox install
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%
# make filesystems
# /boot
mkfs.ext2 /dev/sda1
# /
mkfs.ext4 /dev/sda2
@risyasin
risyasin / .jshintrc
Created March 22, 2016 15:32
Sample JShint RC file
{
"phantom": true,
"devel": true,
"jquery": true,
"node": true,
"browser": true,
"globalstrict": true,
"nonstandard": true,
"bitwise": true,
"curly": true,

Keybase proof

I hereby claim:

  • I am risyasin on github.
  • I am risyasin (https://keybase.io/risyasin) on keybase.
  • I have a public key whose fingerprint is 6AB3 F79F 0692 CE84 B65A 0608 9132 923E 60B4 03CE

To claim this, I am signing this object: