Skip to content

Instantly share code, notes, and snippets.

View Chemaclass's full-sized avatar
🏗️
building

Jose M. Valera Reales Chemaclass

🏗️
building
View GitHub Profile
@jasalt
jasalt / wp.phel
Last active August 27, 2025 15:15
wp.phel
### Phel wrapping over WP / PHP API's
## TODO make a library some day..
(ns my-project\lib\wp
(:require phel\str :as str)
(:require phel\pdo :as pdo)
(:require phel\pdo\statement :as statement))
## Initialize WordPress plugin environment for REPL / tests
(defn resolve-wp-load-path
@jasalt
jasalt / utils.phel
Last active August 27, 2025 15:15
utils.phel
# Some Phel utility fns / macros
(ns my-project\utils)
(defn parse-float
"Converts to float without doing odd type conversions, acting more like
Float/parseFloat in Clojure."
[x]
(when-not (php/is_numeric x)
(throw (php/new \InvalidArgumentException
(str "Invalid value for parse-float (" x ")"))))
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active November 18, 2025 17:52
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

-- Compile with -threaded
import System.IO
import Control.Concurrent
getGreeting :: IO String
getGreeting = do
-- Get id and convert to string
tid <- myThreadId
let greeting = "Hello from " ++ show tid
@Ocramius
Ocramius / Day.php
Created April 3, 2020 14:13
Example abstraction that only allows a resolution of "day" for time inside a specific business domain
<?php
declare(strict_types=1);
namespace Core\Domain\Time;
use DateTimeImmutable;
use DateTimeZone;
use Generator;
use Iterator;
import Data.List
import Data.Char
import System.IO
getSearchWords :: IO [String]
getSearchWords = do
putStrLn "Specify the words to search:"
aux
where
aux = do
@yogthos
yogthos / clojure-beginner.md
Last active October 5, 2025 02:49
Clojure beginner resources

Introductory resources

@ygrenzinger
ygrenzinger / CleanArchitecture.md
Last active November 13, 2025 14:31
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@brianlmoon
brianlmoon / current_on_object.php
Last active April 21, 2016 23:18
WTF PHP current() on object?
<?php
class Foo {
private $bar = "private variable 1";
private $bar2 = "private variable 2";
}
$foo = new Foo;
echo current($foo)."\n";