Skip to content

Instantly share code, notes, and snippets.

View codeonion's full-sized avatar

Muhammad Ali codeonion

View GitHub Profile
@codeonion
codeonion / canvasDraw.html
Created January 21, 2022 14:06
Canvas Draw Quick
<!-- html blank page -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<!-- canvas -->
@codeonion
codeonion / FIX for Ubuntu 20.04 Lutris Certificate issue.txt
Last active June 23, 2020 13:51
Ubuntu 20.04 Lutris Certificate issue RUN -> sudo update-ca-certificates --fresh; export SSL_CERT_DIR=/etc/ssl/certs;
Run these commands on terminal
sudo update-ca-certificates --fresh
export SSL_CERT_DIR=/etc/ssl/certs
# when faced with this issue
INFO 2020-06-23 18:33:48,649 [application.do_command_line:245]:Running Lutris 0.5.6
INFO 2020-06-23 18:33:48,650 [startup.check_driver:54]:Using NVIDIA drivers 440.64 for x86_64
INFO 2020-06-23 18:33:48,650 [startup.check_driver:60]:GPU: Quadro M2000M
INFO 2020-06-23 18:33:48,650 [startup.check_driver:77]:GPU: 10DE:13B0 17AA:222E using nvidia drivers
@codeonion
codeonion / arguments.py
Last active October 29, 2020 22:50
Call your Python Script from your Autohotkey automation script and pass arguments to it as well
import argparse
# GET Arguments using command line
parser = argparse.ArgumentParser(description='For blog.codeonion.com my visitors!')
parser.add_argument("--argument_to_be_passed", required=True, type=str, help="Please pass a value into --argument_to_be_passed")
args = parser.parse_args()
value = args.argument_to_be_passed
print(value)
import argparse
# GET ORDER ID
parser = argparse.ArgumentParser(description='For blog.codeonion.com my visitors!')
parser.add_argument("--argument_to_be_passed", required=True, type=str, help="Please pass a value into --argument_to_be_passed")
args = parser.parse_args()
value = args.argument_to_be_passed
print(value)
; Autoexecute
@codeonion
codeonion / Javascript_Browser_Back_Button_Control.html
Created August 2, 2019 07:20
Javascript Browser Back Button Control
<!DOCTYPE html>
<html>
<head>
<title>Prompt test</title>
</head>
<body onbeforeunload="HandleBackFunctionality()" onunload="">
Please enter your name<br>
<input type="text" id="field1">
<input type="button" value ="oka" id="field2">
</body>
@codeonion
codeonion / index.html
Created February 19, 2019 10:37
custom Unsorted list bullets
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style: none; /* Remove HTML bullets */
padding: 0;
margin: 0;
}
@codeonion
codeonion / snippet.ps1
Created February 18, 2019 14:34
Powershell - Show Messagebox by condition
<# This form was created using POSHGUI.com a free online gui designer for PowerShell
.NAME
Untitled
#>
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
$Form = New-Object system.Windows.Forms.Form
$Form.ClientSize = '400,400'
@codeonion
codeonion / DisableStickyKeys.ahk
Created February 18, 2019 14:33
Toggle the Windows Sticky Keys using this Autohotkey macro
SearchString = Turn on easy access keys
^j::
TrayTip, Sticky Keys Macro, Toggling Sticky Keys, 2,1
Send, #u
Sleep, 1000
Send, %SearchString%
Send, {Enter}
Sleep, 1000
Send, {Enter}
@codeonion
codeonion / uploader.php
Created February 18, 2019 14:31
PHP: File uploading Basic
<?php
//blog.theonlytutorials.com
//author: agurchand
if($_POST){
//get the url
$url = $_POST['url'];
//add time to the current filename
$name = basename($url);
@codeonion
codeonion / index.html
Created February 18, 2019 14:28
Adding a Favicon
<!DOCTYPE html>
<html>
<head>
<title>Favicon</title>
<link rel="shortcut icon" href="stupidFavicon.ico" type="image/x-icon">
<link rel="icon" href="stupidFavicon.ico" type="image/x-icon">
</head>
<body>
Just checking the Favicon
</body>