Skip to content

Instantly share code, notes, and snippets.

View ykhorzon's full-sized avatar
🎼
Play with melody

ykhorizon ykhorzon

🎼
Play with melody
View GitHub Profile
@vijay-prema
vijay-prema / ubuntu-on-asus-g14.md
Last active July 8, 2024 14:17
Ubuntu on Asus ROG Zephyrus G14 2021

Ubuntu on Asus ROG Zephyrus G14 2021 (Setup guide)

Here is a way to do a robust install of Ubuntu (+ optional Windows 11 dual boot and LUKS encryption) on an Asus laptop, with minimal usable hardware support, without a significant amount of tinkering that may break in future or require frequent technical attention.

In summary, the key thing is to have an up to date kernel, which usually means disabling secure-boot and installing the latest stable (6.0+) using mainline or xanmod, and as well as making sure the latest nvidia driver and dkms is installed.

Specs:

  • Model Asus G14 2021 (GA401QC)
  • AMD R7 5800 8 core 16 thread (onboard Radeon graphics)
  • NVIDIA RTX 3050 4GB (60W +15W boost)
@mcvarer
mcvarer / cuda-11.2_installation_on_Ubuntu-18.04
Last active March 12, 2024 02:29
CUDA 11.2 Installation on Ubuntu 18.04
#!/bin/bash
## This gist contains instructions about cuda v11.2 and cudnn 8.1 installation in Ubuntu 18.04 for PyTorch
#############################################################################################
##### forked by : https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73 ########
#############################################################################################
### steps ####
# verify the system has a cuda-capable gpu
@habibutsu
habibutsu / notes.md
Last active November 9, 2023 10:29
ETL frameworks

Distributed computation

Libraries:

@kylemcdonald
kylemcdonald / Interprocess Queue Performance.ipynb
Created September 8, 2019 15:10
Testing the performance of Queue-based IPC in Python 3.7.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrVanboy
mrVanboy / giltab-runner-local-docker.md
Last active June 26, 2023 07:22
Debugging Gitlab CI without installing gitlab-runner

Debugging Gitlab CI jobs locally

You can find a bunch of articles about debugging Gitlab CI jobs locally. My top results from google:

But in all that articles the described way is to install Docker and gitlab-runner executable, run gitlab-runner exec docker JOB_NAME_FROM_GITLAB_CI_YML after that in your repo.

I don't like this approach because I want a simpler way to run appropriate gitlab-runner executable and don't

@kwmonroe
kwmonroe / gist:f3237275df1250732189e29f104a0378
Created October 4, 2018 17:35
deploy k8s to bionic lxd
$ juju deploy cs:bionic/ubuntu --constraints 'mem=30G cores=4 root-disk=50G'
Located charm "cs:ubuntu-12".
Deploying charm "cs:ubuntu-12".

$ juju ssh ubuntu/0

ubuntu@ip-172-31-10-253:~$ snap list
Name              Version    Rev   Tracking  Publisher   Notes
amazon-ssm-agent  2.2.800.0  495   stable/…  aws✓        classic
@loilo
loilo / pass-slots.md
Last active July 23, 2024 08:08
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@StevenACoffman
StevenACoffman / Docker Best Practices.md
Last active June 23, 2024 10:51
Docker Best Practices

Mistakes to Avoid: Docker Antipatterns

Whichever route you take to implementing containers, you’ll want to steer clear of common pitfalls that can undermine the efficiency of your Docker stack.

Don’t run too many processes inside a single container

The beauty of containers—and an advantage of containers over virtual machines—is that it is easy to make multiple containers interact with one another in order to compose a complete application. There is no need to run a full application inside a single container. Instead, break your application down as much as possible into discrete services, and distribute services across multiple containers. This maximizes flexibility and reliability.

Don’t install operating systems inside Docker containers

It is possible to install a complete Linux operating system inside a container. In most cases, however, this is not necessary. If your goal is to host just a single application or part of an application in the container, you need to install only the essential

@thomasdarimont
thomasdarimont / app.py
Last active July 19, 2024 02:17
Simple python example using flask, flask_oidc and keycloak
import json
import logging
from flask import Flask, g
from flask_oidc import OpenIDConnect
import requests
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@javilobo8
javilobo8 / download-file.js
Last active July 1, 2024 23:21
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);