Skip to content

Instantly share code, notes, and snippets.

@bluebrown
bluebrown / wait-for-job.yaml
Created November 8, 2021 06:22
use kubectl init container to wait for job to complete before unblocking the actual pod
---
apiVersion: batch/v1
kind: Job
metadata:
name: myjob
spec:
ttlSecondsAfterFinished: 10
template:
spec:
containers:
@virattt
virattt / hedge-fund-agent-team-v1-3.ipynb
Last active November 14, 2024 23:40
hedge-fund-agent-team-v1-3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@veox
veox / erc20.abi.json
Created January 21, 2018 14:59
ERC20 ABI in JSON format
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@kcranston
kcranston / postgres-jsonb.md
Last active November 14, 2024 23:33
intro to document stores in postgreSQL

Document stores in PostgreSQL

Notes for software engineering meeting presentation

What

  • mid to late 2000s: appearance of Document stores / NoSQL databases such as Mongo, Couch
  • Relational DBs now have support for document data: JSON in MySQL, JSON and JSONB in PostgreSQL
  • Focus on JSONB in Postgres (most full featured)
@luzhuomi
luzhuomi / pocketchip_debian10.md
Last active November 14, 2024 23:21
A tutorial to upgrade NXT pocket C.H.I.P to Debian Buster

Pocket Chip Debian 10 Upgrade Guide

The purpose of this tutorial is to walk through the required steps to upgrade NXT chip (or pocketchip) from debian jessie to debian buster.

If you would like to start your Chip from scratch, follow the steps in the Preparation section.

Preparation (Optional)

A linux host machine, recommended Ubuntu 18.04. However I managed to do it with 20.10 with some tweak.

@imanilchaudhari
imanilchaudhari / PHP Version Manager On Ubuntu 18.04
Created November 20, 2018 05:23
PHP Version Manager On Ubuntu 18.04
Get the information of PHP
==========================
$ sudo apt show php
OR
$ sudo apt show php -a
$ sudo apt install php // this will install default php version ( may be 7.2 )
T0 Install Different Versions Of PHP
@unitycoder
unitycoder / DrawBounds.cs
Last active November 14, 2024 23:17
Draw Bounds with Debug.DrawLine , Draw Box, Draw Runtime Gizmos
void DrawBounds(Bounds b, float delay=0)
{
// bottom
var p1 = new Vector3(b.min.x, b.min.y, b.min.z);
var p2 = new Vector3(b.max.x, b.min.y, b.min.z);
var p3 = new Vector3(b.max.x, b.min.y, b.max.z);
var p4 = new Vector3(b.min.x, b.min.y, b.max.z);
Debug.DrawLine(p1, p2, Color.blue, delay);
Debug.DrawLine(p2, p3, Color.red, delay);
@fnky
fnky / ANSI.md
Last active November 14, 2024 23:16
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@vbe0201
vbe0201 / music_bot_example.py
Last active November 14, 2024 23:13
A simple music bot written using discord.py rewrite and youtube_dl.
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Valentin B.
A simple music bot written in discord.py using youtube-dl.
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly.
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know.