Skip to content

Instantly share code, notes, and snippets.

@mmozeiko
mmozeiko / ctime.c
Last active May 7, 2024 15:35
ctime.c
/* ========================================================================
$File: tools/ctime/ctime.c $
$Date: 2016/05/08 04:16:55PM $
$Revision: 7 $
$Creator: Casey Muratori $
$Notice:
The author of this software MAKES NO WARRANTY as to the RELIABILITY,
SUITABILITY, or USABILITY of this software. USE IT AT YOUR OWN RISK.
@GregTJ
GregTJ / jacobian.py
Last active May 7, 2024 15:35
Affine Map, Jacobian, Curl, and Divergence from Vector Field with Numpy
import numpy as np
from matplotlib import pyplot as plt
# Arbitrary vector field example.
shape = 11, 11
dims = len(shape)
domain = -2, 2
x, y = np.meshgrid(*(np.linspace(*domain, num=d) for d in shape))
field = np.stack((-2 * x * y, x ** 2 + 2 * y - 4))
@noseka1
noseka1 / JSONPath in kubectl CLI.md
Last active May 7, 2024 15:35
JSONPath in kubectl CLI examples

Examples

$ kubectl get pods -o json
$ kubectl get pods -o jsonpath='{@}'
$ kubectl get pods -o jsonpath='{.items[0]}'
$ kubectl get pods -o jsonpath='{.items[0].metadata.name}'
$ kubectl get pods -o jsonpath="{.items[*]['metadata.name', 'status.capacity']}"
$ kubectl get pods -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.startTime}{"\n"}{end}'
$ kubectl get pods -o jsonpath='{.items[*].status.podIP}'
@mjbalcueva
mjbalcueva / calendar.tsx
Last active May 7, 2024 15:32
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@gollum23
gollum23 / superlog
Created February 3, 2016 02:52
Superlog Curso git platzi
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
@MuhammadSaim
MuhammadSaim / rarreg.key
Last active May 7, 2024 15:28
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
@zmts
zmts / aboutNodeJsArchitecture.md
Last active May 7, 2024 15:27
A little bit about Node.js API Architecture

A little bit about Node.js API Architecture (Архитектура/паттерны организации кода Node.js приложений)

node.js

TL;DR

code: https://github.com/zmts/supra-api-nodejs

Предисловие

Одной из болезней Node.js комьюнити это отсутствие каких либо крупных фреймворков, действительно крупных уровня Symphony/Django/RoR/Spring. Что является причиной все ещё достаточно юного возраста данной технологии. И каждый кузнец кует как умеет ну или как в интернетах посоветовали. Собственно это моя попытка выковать некий свой подход к построению Node.js приложений.

@sundowndev
sundowndev / GoogleDorking.md
Last active May 7, 2024 15:27
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@shalior
shalior / vless-link-to-v2ray-json-config-node.js
Created February 17, 2023 04:40
A nodejs function to convert vless links to json config files
@Amir22010
Amir22010 / convert_voc_to_yolo.md
Created February 22, 2020 22:01 — forked from myounus96/convert_voc_to_yolo.md
convert pascal voc dataset to yolo format

Convert PascalVOC Annotations to YOLO

This script reads PascalVOC xml files, and converts them to YOLO txt files.

Note: This script was written and tested on Ubuntu. YMMV on other OS's.

Disclaimer: This code is a modified version of Joseph Redmon's voc_label.py

Instructions:

  1. Place the convert_voc_to_yolo.py file into your data folder.