Skip to content

Instantly share code, notes, and snippets.

View stelcodes's full-sized avatar
🏠
Working from home

Stel Abrego stelcodes

🏠
Working from home
View GitHub Profile
@matthewpi
matthewpi / README.md
Last active May 26, 2024 02:13
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

@carpntr
carpntr / replace-appindicator.sh
Created November 20, 2021 17:35
rebuild (install) debian packages that depend on libappindicator with libayatana-appindicator (tested on debian 11 with discord and keeweb)
#!/bin/bash
function usage() {
cat <<USAGE
Usage: $0 [options] <package.deb>
Options:
--install: install after rebuild
--cleanup: remove tmpfiles after
USAGE
exit 1
@borkdude
borkdude / assoc_pairs.clj
Last active April 6, 2021 11:38
Reports number of used k/v pairs in assoc to gather data for https://clojure.atlassian.net/browse/CLJ-1656
#!/usr/bin/env bash
#_" -*- mode: clojure; -*-"
#_(
"exec" "clojure" "-Sdeps" "{:deps {borkdude/grasp {:git/url \"https://github.com/borkdude/grasp\" :sha \"6315cea8c0b6dafc7b1eef9ccd03d6d5590d2045\"}}}" "-M" "$0" "$@"
)
(require '[clojure.java.io :as io]
'[clojure.spec.alpha :as s]
'[clojure.string :as str]
'[grasp.api :as g])
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 15, 2024 20:11
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@mrmcc3
mrmcc3 / demo.clj
Last active December 21, 2020 04:58
CommonMark from Clojure + EDN front matter https://mrmcc3.github.io/blog/posts/commonmark-in-clojure/
(ns demo
(:import
(org.commonmark.parser Parser)
(org.commonmark.renderer.html HtmlRenderer)))
(def parser (.build (Parser/builder)))
(def renderer (.build (HtmlRenderer/builder)))
(defn -main [input]
(->> (slurp input)
@rambabusaravanan
rambabusaravanan / apache.conf
Last active May 21, 2024 12:02
SPA - Apache, Nginx Configuration for Single Page Application like React.js on a custom path
# To host on root path just use "<Location />" for http://mydomainname.in
# To host on non-root path use "<Location /myreactapp>" for http://mydomainname.in/mypath
# If non-root path, don't forgot to add "homepage": "/myreactapp" in your app's package.json
<VirtualHost *:80>
ServerName mydomainname.in
DirectoryIndex index.html
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
@chris-martin
chris-martin / nixos-from-ubuntu.md
Last active February 17, 2024 18:17
How to install NixOS from an Ubuntu liveCD

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@telekosmos
telekosmos / uniq.js
Last active November 15, 2022 17:13
Remove duplicates from js array (ES5/ES6)
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var uniqEs6 = (arrArg) => {
return arrArg.filter((elem, pos, arr) => {
return arr.indexOf(elem) == pos;
});
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 28, 2024 08:25
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites