Skip to content

Instantly share code, notes, and snippets.

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@otobrglez
otobrglez / jaccard_recommendation.rb
Last active April 2, 2024 17:51
Simple recommendation system written in Ruby based on Jaccard index.
# Simple Recommendation Engine in Ruby
# Visit: http://otobrglez.opalab.com
# Author: Oto Brglez <otobrglez@gmail.com>
class Book < Struct.new(:title)
def words
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort
end
@mihir-kumar-thakur
mihir-kumar-thakur / disable-keyboard-on-boot-ubuntu
Last active March 2, 2024 08:05
disable-keyboard-on-boot-ubuntu
Disable Laptop Keyboard in Ubuntu
Taken From :- https://blog.hostonnet.com/laptop-keyboard-ubuntu
To disable laptop built in keyboard in Ubuntu, first you need to identify the device id for keyboard.
Now run xinput –list command to get list of all input devices
hostonnet@pc4:~$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@MichaelCurrie
MichaelCurrie / git-lfs-example.sh
Created March 13, 2018 11:02
Use git-lfs on existing repository
# Install git-lfs
# (From https://github.com/git-lfs/git-lfs/wiki/Installation)
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
# Add git-lfs to an existing repo
@jswny
jswny / Flexible Dockerized Phoenix Deployments.md
Last active July 3, 2023 05:25
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@georgenaranjo96
georgenaranjo96 / elementaryos.md
Created October 16, 2020 06:18 — forked from Surendrajat/elementaryos.md
elementaryOS | Things I Do After Installing elementary OS Hera

First Things First

  • Enable PPA

     sudo apt update
     sudo apt install software-properties-common apt-transport-https curl
  • Install apt-fast [Yes! it's really fast]