Skip to content

Instantly share code, notes, and snippets.

View smkplus's full-sized avatar
😍
Curios

Seyed Morteza Kamali smkplus

😍
Curios
View GitHub Profile
using System;
using System.IO;
public class Program
{
public static void Main()
{
int counter = ReadCounterFromFile(); // Reading the counter value from a file
// Incrementing the counter
@smkplus
smkplus / RandomImage.py
Created November 11, 2023 18:57
RandomImage
import requests
# Define the URL
url = "https://source.unsplash.com/random/900x700/"
# Send an HTTP GET request to the URL
response = requests.get(url)
# Check if the request was successful (status code 200)
if response.status_code == 200:
@smkplus
smkplus / YoutubePlaylistLinks.py
Created November 11, 2023 18:56
YoutubePlaylistLinks
@smkplus
smkplus / GetTodayDatePersian.py
Created September 29, 2023 09:01
Get Persian Date
import jdatetime
# Get the current date in Persian
today = jdatetime.date.today()
# Print the full date in Persian
print(today.strftime("%A %d %B %Y"))
@smkplus
smkplus / JalaliTrello.js
Last active September 6, 2023 17:40
Jalali Trello Use InjectCode to use this
// ==UserScript==
// @name New Jalali Date for Trello
// @namespace Seyed Morteza Kamali
// @description Jalali date updated for Trello with support for all formats
// @include https://trello.com/*
// @include http://trello.com/*
// @version 0.0.2 beta
// ==/UserScript==
fetch('https://unpkg.com/jalali-moment/dist/jalali-moment.browser.js')
@smkplus
smkplus / cutmp3.py
Last active June 16, 2023 14:32
Python Cut MP3
from moviepy.editor import AudioFileClip
from tkinter import Tk, filedialog
# Create Tkinter root window
root = Tk()
root.withdraw() # Hide the root window
# Open file dialog to select the audio file
file_path = filedialog.askopenfilename()
@smkplus
smkplus / Quiz.json
Last active October 25, 2020 06:34
Quiz
{
"tasksData": [
{
"name": "Animals",
"localizedName": "حيوانات",
"gameType": 2,
"orderNumber": 1,
"Levels": [
{
"number": 1,
@smkplus
smkplus / UnityAsyncOperationAwaiter.cs
Created October 2, 2020 06:45 — forked from mattyellen/UnityAsyncOperationAwaiter.cs
Allows the use of async/await (instead of yield) with any Unity AsyncOperation
public static class ExtensionMethods
{
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp)
{
var tcs = new TaskCompletionSource<object>();
asyncOp.completed += obj => { tcs.SetResult(null); };
return ((Task)tcs.Task).GetAwaiter();
}
}
@smkplus
smkplus / UniversalPipelineTemplateShader.shader
Created September 9, 2020 15:51 — forked from phi-lira/UniversalPipelineTemplateShader.shader
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@smkplus
smkplus / Sprite Lit Master.shader
Created September 6, 2020 01:59
URP 2D Lit Template - Sprite Lit Master
Shader "Sprite Lit Master"
{
Properties
{
[NoScaleOffset]_MainTex("MainText", 2D) = "white" {}
_Color("Color", Color) = (0, 0, 0, 0)
}
SubShader
{
Tags