Skip to content

Instantly share code, notes, and snippets.

View nikolalsvk's full-sized avatar
🍍

Nikola Đuza nikolalsvk

🍍
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active May 30, 2025 01:09
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@TheCedarPrince
TheCedarPrince / init.vim
Last active June 5, 2024 11:48
My (neo)Vim Configuration File
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM SETTINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" TURNS LINE NUMBERING ON
set nu
" TRIGGER `autoread` WHEN FILES CHANGES ON DISK
set autoread
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif
@lhorie
lhorie / longest-keyword-sequence.md
Last active November 13, 2024 04:15
What's the longest keyword sequence in Javascript?
* **Takeaways**
* Share test utilities
* Use a lint rule when people don't follow best practices
* Not sure this is worth the effort for us
* It's easy to start writing tests, it's hard to continuously maintain tests and consistently keep coverage high
* How do you test a module?
* In isolation
* With integrations
* Mock integrations
* Test app but mock external dependencies
@maxivak
maxivak / __readme.md
Last active January 19, 2024 15:00
Load code in libraries in Rails 5

Load lib files in production (Rails 5)

If you have your code defined in classes in lib/ folder you may have problems to load that code in production.

Autoloading is disabled in the production environment by default because of thread safety.

Change config/application.rb:

    config.autoload_paths << Rails.root.join("lib")
 config.eager_load_paths &lt;&lt; Rails.root.join("lib")
@gusaiani
gusaiani / gusaiani.plugin.zsh
Last active November 17, 2022 21:53
ZSH Initializer
mkcd() {
dir="$*"
mkdir -p "$dir" && cd "$dir"
}
cpwd() {
pwd | pbcopy
}
alias gcne='git commit --amend --no-edit'
@avinmathew
avinmathew / index.jsx
Created August 8, 2017 11:54
Multiple layouts with React Router v4
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
@mpneuried
mpneuried / Makefile
Last active April 29, 2025 08:09
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@bhrott
bhrott / clone_repositories.sh
Created June 24, 2016 02:28
SH: Clone Multiple Repositories Repositories
#!/bin/sh
# Clone multiple repositories.
echo "=== CLONENATOR ==="
array=( "https://github.com/angular/angular.git"
"https://github.com/nodejs/node.git" )
for element in ${array[@]}