Skip to content

Instantly share code, notes, and snippets.

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@judge2020
judge2020 / FileUnblock.cs
Last active January 20, 2017 14:57
unblock file
public class FileUnblocker {
[DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool DeleteFile(string name );
public bool Unblock(string fileName) {
return DeleteFile(fileName+ ":Zone.Identifier");
}
}
@judge2020
judge2020 / ImagesOnly.py
Created February 19, 2017 19:17
Delete non-image attachments discord - discord.py
#!/usr/bin/python
# python 3
# requires https://github.com/Rapptz/discord.py / "pip install discord.py"
# licensed under the MIT license. For more information view LICENSE.md
import discord
import asyncio
import os.path
import re
import sys

Starting to look really good for the most part! :)

Haven't looked at the code yet but here are some UI/UX changes I would like to see:

Installed

  • Updating plugins freezes the app
  • "Updating" and "Update installed" still look like hyperlinks
  • "Update installed" is clickable and causes the update to run again
  • "Update installed" should probably say "Restart required" and restart the app when clicked (Maybe "Installed. Restart now"? not entirely sure on wording, something like that though)
@judge2020
judge2020 / crash logs.md
Last active June 10, 2017 21:59
Posting Crash logs in Altis

How to find a crash log

  1. open launcher
  2. click options
  3. click logs folder
  4. find latest log using modified date.

Launcher: launcher_log.txt

game: project-altis-****.log

@judge2020
judge2020 / keybase.md
Created October 4, 2017 23:15
keybase.md

Keybase proof

I hereby claim:

  • I am judge2020 on github.
  • I am judge2020 (https://keybase.io/judge2020) on keybase.
  • I have a public key ASCvSL6rMQk3mT_v2_SN751QzumxPMJSBpAOMzOk1fWsrgo

To claim this, I am signing this object:

// Token: 0x04004F84 RID: 20356
public static global::Logger Bob = new global::Logger("Bob");
// Token: 0x04004F85 RID: 20357
public static global::Logger Mike = new global::Logger("Mike");
// Token: 0x04004F86 RID: 20358
public static global::Logger Brian = new global::Logger("Brian");
// Token: 0x04004F87 RID: 20359
@judge2020
judge2020 / migrate.py
Created January 5, 2018 21:14
migrate users.ini to usersDB.json
import pprint
import json
from configobj import ConfigObj
pp = pprint.PrettyPrinter(indent=4)
db = ConfigObj(infile='users.ini')
tmp = db['suggestion_count']
@judge2020
judge2020 / QtBuild.bat
Last active February 16, 2018 02:41
Qt build with openssl for VC 2017
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -no_logo
which nmake
echo "%OPENSSL_LIBS%"
pause
set _ROOT=C:\QtBuild
cd %_ROOT%
( dir /b /a "%dir%" | findstr . ) > nul && (
echo %dir% non-empty
) || (
echo %dir% empty
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace SendKeysToAnyApplication
{
class Program
{
delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);