Skip to content

Instantly share code, notes, and snippets.

@yanniszark
yanniszark / dex-config-ldap-partial.yaml
Created June 13, 2019 13:38
Dex LDAP Connector Config
connectors:
- type: ldap
# Required field for connector id.
id: ldap
# Required field for connector name.
name: LDAP
config:
# Host and optional port of the LDAP server in the form "host:port".
# If the port is not supplied, it will be guessed based on "insecureNoSSL",
# and "startTLS" flags. 389 for insecure or StartTLS connections, 636
@probonopd
probonopd / linux_fusion360.md
Last active May 21, 2024 07:40
Autodesk Fusion 360 on Linux

Autodesk Fusion 360 on Linux

In the Web Browser

Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.

https://myhub.autodesk360.com

On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.

@sadiqsalau
sadiqsalau / mtk-partitions.txt
Last active May 21, 2024 07:40
MTK Partitions
MTK platform partition meaning
#Pre-loader
Pre-loader image
Handles all the download and secure boot procedure
#DSP_BL
DSP Boot Loader
#MBR、EBR1、EBR2
Ext4 file system partition index table
@ColeMurray
ColeMurray / app.ts
Created August 13, 2023 04:10
source/app.ts from serverless express
import express from "express";
import cors from "cors";
import apiRoutes from "./api";
import {errorResponder} from "./middleware/errorResponder";
export const app = express();
app.use(cors({origin: '*'}));
app.use(express.json());
app.use(express.urlencoded({extended: true}))
@mosquito
mosquito / README.md
Last active May 21, 2024 07:34
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@fate0
fate0 / pymarshal.py
Last active May 21, 2024 07:33
onmyoji: test
import types
import cStringIO
TYPE_NULL = '0'
TYPE_NONE = 'N'
TYPE_FALSE = 'F'
TYPE_TRUE = 'T'
TYPE_STOPITER = 'S'
TYPE_ELLIPSIS = '.'
TYPE_INT = 'i'
@Birch-san
Birch-san / llama-convert.md
Created June 1, 2023 18:24
Converting LLaMA model weights to huggingface format + safetensors

Loading LLaMA via Huggingface + Safetensors, with 4-bit quantization

Let's say we're trying to load a LLaMA model via AutoModelForCausalLM.from_pretrained with 4-bit quantization in order to inference from it:

python -m generate.py

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, LlamaTokenizerFast, LlamaForCausalLM
import transformers
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active May 21, 2024 07:25
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@n9ti
n9ti / config_index.js
Last active May 21, 2024 07:25
Setup Express.js with Vue.js SPA
// config/index.js
module.exports = {
// ...
dev: {
proxyTable: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
@twolfson
twolfson / .gitconfig
Last active May 21, 2024 07:24
Proof of concept to explore merge conflict resolution with SOPS encoded files for https://github.com/mozilla/sops/issues/52
[mergetool "sops-mergetool"]
cmd = ./sops-mergetool.sh "$BASE" "$LOCAL" "$REMOTE" "$MERGED"