Skip to content

Instantly share code, notes, and snippets.

sv_cheats 1
nav_generate
tf_bot_quota 11
tf_bot_difficulty 0
tf_bot_melee_only 1
@syaifulnizamyahya
syaifulnizamyahya / mount.gdrive.sh
Created June 18, 2017 15:12
Google Drive mounting command
#!/usr/bin/bash
echo Mount log $(date) $'\r'$'\r'
echo "Starting Cloud Mounts" $'\r'
#mongodb and unionfs must be installed first
#get client id and secret
#client id .apps.googleusercontent.com
#client secret _iu1
#create mongodb db directory /mnt/user/appdata/plexdrive/data/db if its still not created
@syaifulnizamyahya
syaifulnizamyahya / unmount.gdrive.sh
Created June 18, 2017 15:13
Unmount google drive
#!/usr/bin/bash
echo Unmount AllMovies
fusermount -u /mnt/user/Media/AllMovies/
echo Unmount Movies
fusermount -u /mnt/user/Media/Movies/
echo Unmount MoviesKids
fusermount -u /mnt/user/Media/MoviesKids/
sudo firewall-cmd --permanent --zone=public --add-port=19999/tcp
sudo firewall-cmd --reload
@syaifulnizamyahya
syaifulnizamyahya / dump.txt
Last active November 17, 2017 06:35
C# Print out all contents in an object
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
public static string Dump(object target)
{
string json = JsonConvert.SerializeObject(target);
JToken jt = JToken.Parse(json);
return jt.ToString();
}
@syaifulnizamyahya
syaifulnizamyahya / WindowsDefender.txt
Created March 24, 2018 13:56
Prevent Windows Defender from deleting/quarantining files
Edit Windows Defender setting to prevent deleting unharmful files
From Admin Powershell
Turn off Automatic Remediation:
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableRoutinelyTakingAction /t REG_DWORD /d 1 /f
Turn on Automatic Remediation:
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableRoutinelyTakingAction /f
@syaifulnizamyahya
syaifulnizamyahya / autostart.sh
Last active October 20, 2018 15:51
Autorun script to mount rclone and encfs for libreelec
#/bin/sh
cd /storage/downloads/Tool/RcloneTool/tmp
curl -O https://downloads.rclone.org/rclone-current-linux-arm64.zip
unzip -o rclone-current-linux-arm64.zip
cd rclone-*-linux-arm64
cp * /storage/downloads/Tool/RcloneTool/bin
chown root:root /storage/downloads/Tool/RcloneTool/bin/rclone
chmod 755 /storage/downloads/Tool/RcloneTool/bin/rclone
cd /storage/downloads/Tool/RcloneTool/bin
@syaifulnizamyahya
syaifulnizamyahya / advancedsettings.xml
Created October 20, 2018 16:34
Kodi advanced settings
<advancedsettings>
<video>
<excludefromscan>
<regexp>(noscan)</regexp>
<regexp>[Rr][Ee][Mm][Uu][Xx]</regexp>
<regexp>[!-._ \\/][Tt][Rr][Aa][Ii][Ll][Ee][Rr][!-._ \\/]</regexp>
<regexp>[!-._ \\/][Ss][Aa][Mm][Pp][Ll][Ee][!-._ \\/]</regexp>
</excludefromscan>
<excludetvshowsfromscan>
<regexp>(noscan)</regexp>
@syaifulnizamyahya
syaifulnizamyahya / GetAspectRatio.cpp
Last active August 9, 2022 14:54
Finding correct aspect ratio of flat paper captured from camera
// Get3dRectFrom2d.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/aruco.hpp>
#define CAMERA_WINDOW "Simple ArUco"
Install rclone
Install encfs
Rclone config
Create target directory
Mount rclone
Mount encfs
Smb uses diff password. Setup it like below
sudo smbpasswd -a <username>