Skip to content

Instantly share code, notes, and snippets.

View larrasket's full-sized avatar

Salih Muhammed larrasket

  • La Vita Nuova
View GitHub Profile
“I think it wise, and only honest, to warn you that my goal is immodest. It is
not my purpose to "transfer knowledge" to you that, subsequently, you can
forget again. My purpose is no less than to effectuate in each of you a
noticeable, irreversable change. I want you to see and absorb calculational
arguments so effective that you will never be able to forget that exposure.” ―
Edsger W. Dijkstra
@AhmedMostafa16
AhmedMostafa16 / .font.conf
Created July 25, 2021 13:39
My .font.conf for perfect font rendering
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>~/.fonts</dir>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
;;(advice-add #'vertico--display-candidates :around #'my-display)
;;(advice-add #'vertico--resize-window :around #'no-resize-vertico)
;;(defun no-resize-vertico (&rest _))
;; TODO open issues:
;; DONE cursor in minibuffer is still shown
;; DONE vertico--exhibit/consult--refresh-hook should be hooked into, in order to ensure that resize works
;; TODO recursive minibuffers
@andersondanilo
andersondanilo / instructions.md
Last active October 27, 2024 23:48
ms2109 linux (MacroSilicon USB Video)

Play

ffplay -f video4linux2 -framerate 60 -video_size 1920x1080 -input_format mjpeg /dev/video2

You can try other video number (video3, video4)

Maybe you need:

Create: /etc/udev/rules.d/91-hdmi-to-usb-ms2109.rules With:

@brenhinkeller
brenhinkeller / lispmode.jl
Last active July 6, 2024 10:59
Bare-bones REPL for Julia's secret built-in s-expression syntax, in under 30 lines
to_expr(x) = x
to_expr(t::Tuple) = Expr(to_expr.(t)...) # Recursive to_expr implementation courtesy of Mason Protter
lisparse(x) = to_expr(eval(Meta.parse(x))) # Note that the `eval` in here means that any normal (non-s-expression) Julia syntax gets treated a bit like a preprocessor macro: evaluated _before_ the s-expression syntax is compiled and evaluated
function lispmode()
# READ
printstyled("\nlisp> ", color=:magenta, bold=true)
l = readline()
while l !== "(:exit)"
try # So we don't get thrown out of the mode
# EVAL
(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
@vindarel
vindarel / common-lisp-VS-clojure.md
Last active October 12, 2024 22:28
Notes on Common Lisp VS Clojure

Testimonies

CL's compiler

The thing in CL I miss most doing Clojure as my day job? CL's compiler. I like having a compiler tell me at compile time about the mistakes I've made. Bogus arguments. Unreachable code because of unhandled exceptions, and so on. CL saves me round after round of bugs that in clojure aren't found until you run the code. If you test well, it's found when testing, if you don't it's found in production. "Clojure compiler" almost demands air quotes.

CL's optional but oh-so-useful model of type declarations is also infinitely more useful (to me) than Clojure's use of "spec", and instrumentation that happens only at test time because of the cost. Depending on the OPTIMIZE declarations, other type defs are a floor wax and dessert topping. Want checks for argument types? Lower optimizations. Want most efficient machine code? High optimizations.

/u/Decweb, March 2023 https://www.reddit.com/r/lisp/comments/11ttnxk/the_rise_fall_of_lisp_too_good_for_the_rest_of/jczpysp/

@NaniteFactory
NaniteFactory / setcookie.go
Created October 21, 2019 06:30
chromedp set-cookie example
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/network"
@WetHat
WetHat / CL-PrettyPrintTableData.ipynb
Last active August 1, 2024 16:36
Pretty Print Table Data in Common Lisp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewloable
andrewloable / Program.cs
Created June 23, 2019 05:48
Use a library compiled in Go in c# (.net)
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace GoSharedDLL
{
class Program
{
[DllImport("shared.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
private static extern IntPtr ReturnReversedString(byte[] input);