Skip to content

Instantly share code, notes, and snippets.

@jnwhiteh
jnwhiteh / install-ljitrocks.sh
Created August 4, 2011 14:49
Install luajit+luarocks in sandboxed environment
#!/usr/bin/env bash
set -e
die() {
echo "$1";
exit 1;
}
# Fetch and install LuaJIT/LuaRocks into the local directory
@truebit
truebit / init.lua
Last active May 9, 2024 20:08
Kitty Terminal: pull down from top like iTerm2
local spaces = require("hs.spaces") -- https://github.com/asmagill/hs._asm.spaces
-- Switch kitty
hs.hotkey.bind({'command'}, 'escape', function () -- change your own hotkey combo here, available keys could be found here:https://www.hammerspoon.org/docs/hs.hotkey.html#bind
local BUNDLE_ID = 'net.kovidgoyal.kitty' -- more accurate to avoid mismatching on browser titles
function getMainWindow(app)
-- get main window from app
local win = nil
while win == nil do
@rkitover
rkitover / load-visual-studio-environment.sh
Last active May 9, 2024 20:08
Load Visual Studio environment in MSYS2.
# Visual Studio Environemnt Loader
#
# For MSYS2/Cygwin/etc..
#
# Set the following in your ~/.bashrc:
#
# ENVIRONMENT CONFIGURATION:
#
# To enable static linking where possible:
#
@SJ-James
SJ-James / etModules-icon-codes.css
Created March 21, 2018 21:33
A list of the codes for Divi's built in icon collection
/* example of use */
h1:before {
font-family: 'etModules';
content: "\24";
}
/* codes */
.arrow_up:before {
content: "\21";
@yannabraham
yannabraham / doseResponsePython.ipynb
Last active May 9, 2024 20:07
How to do Dose/Response curve fitting in Python for Drug Discovery
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cobanov
cobanov / vgg16.py
Created February 14, 2019 09:58
VGG16 Keras
# -*- coding: utf-8 -*-
"""
Deep Learning Türkiye topluluğu için Mert Çobanoğlu tarafından hazırlanmıştır.
Amaç: Keras ile nesne tanıma.
Algoritma: Evrişimli Sinir Ağları (Convolutional Neural Networks)
Ek: Çalışma ile ilgili rehber README.md dosyasında belirtilmiştir.
"""
from keras.applications.vgg16 import VGG16
@wojteklu
wojteklu / clean_code.md
Last active May 9, 2024 20:07
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

update() {
let transientPointerFoundThisFrame = false;
for (let input of this.engine.xr.session.inputSources) {
if (input.targetRayMode !== 'transient-pointer') continue;
// If we made it this far, we're dealing w/ a transient-pointer
transientPointerFoundThisFrame = true;
// Get the pose from the session from using the targetRaySpace and the currentRefSpace
@yukoff
yukoff / GitHub Wiki Subtree Storage.markdown
Created September 3, 2017 13:01 — forked from joshuajabbour/GitHub Wiki Subtree Storage.markdown
Store and edit GitHub wikis within the main project repository.

Project documentation

The project documentation (stored in the docs directory) is a git subtree of the project wiki. This allows for the documentation to be referenced and edited from within the main project.

Initial local setup

When cloning the main project repository for the first time, the wiki repository must be added as a remote.

git remote add wiki https://github.com//.wiki.git

@packerdl
packerdl / lxc_plex_intel_quicksync.md
Last active May 9, 2024 20:02
Intel QuickSync passthrough to an unprivileged LXC container running plex.

Running Plex in an Unprivileged LXC with Intel QuickSync Passthrough

First setup an unprivileged Ubuntu container with Plex Media Server installed. Inside the container take note of the id of the plex group.

# Your Plex group's ID may be different
$ getent group plex | cut -d : -f3
998