Skip to content

Instantly share code, notes, and snippets.

@chrismccord
chrismccord / dev.exs
Created May 8, 2024 20:06
Live Reload LiveView notify
config :wps, WPSWeb.Endpoint,
live_reload: [
notify: [
live_view: [
~r"lib/wps_web/core_components.ex$",
~r"lib/wps_web/(live|components)/.*(ex|heex)$"
]
],
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
@mshRoR
mshRoR / docker-permission.txt
Created April 8, 2020 08:04
How to fix docker: Got permission denied issue
If you want to run docker as non-root user then you need to add it to the docker group.
1. Create the docker group if it does not exist
$ sudo groupadd docker
2. Add your user to the docker group.
$ sudo usermod -aG docker $USER
3. Run the following command or Logout and login again and run (that doesn't work you may need to reboot your machine first)
$ newgrp docker
4. Check if docker can be run without root
$ docker run hello-world
@rxaviers
rxaviers / gist:7360908
Last active May 11, 2024 18:25
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 11, 2024 18:20 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check

Optlam.js - 3.4 million IPS

// ~~~~~~~~~~~~~~~~~~~~~~ Optlam.js ~~~~~~~~~~~~~~~~~~~~~~
// An optimal λ-calculus normalizer written in JavaScript.
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Optlam.js is a simple, optimal (in Levy's sense) λ-calculus evaluator using
// interaction nets. It is, currently, as far as I know, the fastest
// implementation of functions in the world. It uses Lamping's Abstract
// Algorithm - that is, the so called (and problematic) "oracle" is avoided
@Hupotronic
Hupotronic / h264-vs-vp8-test.md
Last active May 11, 2024 18:19
H.264 & VP8 Quality Comparison And Some Words on Future Video Formats

VP8 vs H.264 - Which One is Better?

So I was reading Hacker News and decided to read the comments in the thread about H.265 being approved. Pretty close to the top was this comment about VP9, Google's future video format. I have some words of my own about it and other future formats at the bottom of this post, but what jumped out from the comment to me was this part:

Many have already implemented VP8 (which is also slightly better than h.264 at this point)

The comparison linked to back up that statement is faulty for several reasons, such as not providing the source material used (hell, he doesn't even name the source material), exact encoding settings used (no, some random profiles are not enough), not providing the resulting encodes, only providing a

@peltho
peltho / golang.md
Last active May 11, 2024 18:18
Golang cheatsheet

Golang cheatsheet

Variables

var foo int
var foo = 0
foo := 0

var a, b, c int = 1, 2, 3
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active May 11, 2024 18:17
Building a react native app in WSL2
@rfajarachmad
rfajarachmad / install_codedeploy_agent_linux.sh
Created October 21, 2016 15:22
Install Code Deploy Agent on EC2 Linux instance
sudo yum update
sudo yum install ruby
sudo yum install wget
wget https://{bucket-name}.s3.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
## bucket-name represents one of the following:
## aws-codedeploy-us-east-1 for instances in the US East (N. Virginia) region
## aws-codedeploy-us-west-1 for instances in the US West (N. California) region
@ES-Alexander
ES-Alexander / course_monitor.py
Created June 21, 2022 07:18
Minimal example for course tracking of a GPS-enabled MAVLink vehicle, using a low-pass IIR filter for averaging values over time.
#!/usr/bin/env python3
from pymavlink import mavutil, mavlink
class CourseAverager:
MSG_TYPE = 'GLOBAL_POSITION_INT'
def __init__(self, mavlink_connection, request_rate=1, decay_rate=0.95, initial_course=(0, 0)):
self.master = mavlink_connection
self.request_message(request_rate)