Skip to content

Instantly share code, notes, and snippets.

View gkmngrgn's full-sized avatar
🎮
Can you hear me?

Gökmen Görgen gkmngrgn

🎮
Can you hear me?
View GitHub Profile
numbers_in_words = {
1: "one",
2: "two",
3: "three",
4: "four",
5: "five",
6: "six",
7: "seven",
8: "eight",
9: "nine",
class IpAddrKind:
V4 = 1
V6 = 2
class IpAddr:
def __init__(self, kind: IpAddrKind, address: str) -> None:
self.kind = kind
self.address = address
home = IpAddr(
@gkmngrgn
gkmngrgn / enum_example_from_rust.rs
Created April 25, 2024 13:09
Enum example from Rust
enum IpAddrKind {
V4,
V6,
}
struct IpAddr {
kind: IpAddrKind,
address: String,
}
cmd.add_task {
name = "fix-mosh",
description = "fix mosh permission issues.",
required_platforms = { "macos" },
command = function(arg)
local firepower = "sudo /usr/libexec/ApplicationFirewall/socketfilterfw"
-- temporarily shut firewall off
cmd.run(firepower .. " --setglobalstate off")
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<head>
<title>FreshRSS</title>
<dateCreated>Sun, 25 Dec 2022 20:57:12</dateCreated>
</head>
<body>
<outline text="APPS">
<outline text="FreshRSS releases" type="rss" xmlUrl="https://github.com/FreshRSS/FreshRSS/releases.atom" htmlUrl="https://github.com/FreshRSS/FreshRSS/" description="FreshRSS releases @ GitHub"/>
</outline>
\LoadClass[12pt]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{fontspec}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{hologo}
\usepackage[hidelinks]{hyperref}
\usepackage{parskip}
@gkmngrgn
gkmngrgn / en_tr_layout.ahk
Last active October 22, 2021 16:16
An AutoHotkey script for using Turkish special letters in US keyboard layout
>!a::Send {U+00E2}
>!c::Send {U+00E7}
>!g::Send {U+011F}
>!i::Send {U+0131}
>!o::Send {U+00F6}
>!s::Send {U+015F}
>!u::Send {U+00FC}
>!+a::Send {U+00C2}
>!+c::Send {U+00C7}
>!+g::Send {U+011E}
@gkmngrgn
gkmngrgn / collisions.lua
Created February 20, 2021 20:49
collisions.lua
-- local functions like this one are only visible (you can only acces them) from the module (file). This is
-- a good practice to not pollute global namespace with things that are not supposed to be there.
-- This function just check if 2 rectangles collides and returns true or false.
local function checkCollision(a, b)
return a.x < b.x + b.w and
a.x + a.w > b.x and
a.y < b.y + b.h and
a.h + a.y > b.y
end
@gkmngrgn
gkmngrgn / html-css-backend-with.lisp
Last active June 29, 2020 12:50
HTML & CSS Backend with Lisp
;;; I wrote this snippet after I read this article:
;;; https://blog.cloudflare.com/the-languages-which-almost-became-css/
;;;
;;; The question is, what happens if I want to use LISP for coding CSS, HTML,
;;; and backend-side (render the template and publish it in a server)? Is it
;;; possible to keep the code simple, and readable or is it waste of time?
;;;
;;; In the code, there's no server implementation because I need a Linux to test
;;; it. That would be easy to do that with 'woo.
;;;
@gkmngrgn
gkmngrgn / urls.txt
Last active April 7, 2023 10:59
My Feeds
http://lucumr.pocoo.org/feed.atom "Python" "Rust" # Armin Ronacher
http://feeds.feedburner.com/ScottHanselman "Csharp" # Scott Hanselman
https://www.joelonsoftware.com/feed/ "Csharp" # Joel Spolsky
http://www.norvig.com/rss-feed.xml "Python" # Peter Norvig
http://nicktasios.nl/rss.xml "Cpp" # Nick Tasios
http://feeds.feedburner.com/SolarianProgrammer "Cpp" # Paul Silisteanu
https://alexgaynor.net/feed.xml "Python" "Rust" # Alex Gaynor
http://feeds.feedburner.com/codinghorror?format=xml "Csharp" # Jeff Atwood
https://drewdevault.com/feed.xml "Golang" # Drew DeVault
http://dave.cheney.net/feed