Skip to content

Instantly share code, notes, and snippets.

View asaf400's full-sized avatar

Asaf Levy asaf400

View GitHub Profile
@pklaus
pklaus / dnsupdate.py
Last active November 14, 2023 23:50
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
#
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
for i in $(find . -name '*.json');do python -c 'import sys,json,yaml;print(yaml.safe_dump(json.loads(sys.stdin.read()), default_flow_style=False))' < $i > ${i/json/yaml};done
@chmouel
chmouel / export-all-ose3-resources.bash
Last active February 25, 2016 07:43
Export all openshift 3 resources from all users and defaults, should be good for backups
#!/bin/bash
alltypes="pods,po,replicationcontrollers,rc,daemonsets,ds,services,svc,events,ev,secrets,persistentvolumes,pv,persistentvolumeclaims,pvc,limitranges,limits,resourcequotas,quota,nodes,no,namespaces,ns,componentstatuses,cs,endpoints,ep,serviceaccounts,sa,securitycontextconstraints,scc,deploymentconfigs,dc,buildconfigs,bc,builds,routes,projects,imagestreams,is,imagestreamtags,istag,policies,rolebindings,users,groups,templates,policybindings,roles,oauthclients"
oc export ${alltypes} --all-namespaces
@HarmJ0y
HarmJ0y / Restore-UserDPAPI.ps1
Last active July 7, 2023 09:05
Restore a user's stolen DPAPI master key folder and optional KeePass DPAPI data blob.
function Restore-UserDPAPI {
<#
.SYNOPSIS
Restores a user account's DPAPI master key on a new system.
Author: @harmj0y
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
@Voronoff
Voronoff / wsl_setup.md
Last active September 29, 2023 16:41
Windows development in 2018: Setting up a coding environment using Windows Subsystems for Linux (WSL), Hyper, and Visual Studio Code (vscode) with Python.

If you're here just for the section on vscode working with Python on WSL, jump here.

Creating a modern development environment in Windows

Windows is now a development environment that can compete with Mac and Linux. Windows Subsystems for Linux lets you have an Ubuntu (or other Linux flavor) installation that works near seemlessly inside of Windows. Hyper Terminal running WSL's Bash and Visual Studio Code feel really nice to code in. These are instructions for getting set up and smoothing out most of the remaining rough edges. I've included a section on getting vscode to work well with Python and WSL, but the general pattern should be usable for any unsupported language (as of now, I believe it's only Node.js that has WSL support in vscode).

Table of Contents

@opus-x
opus-x / Spotify_Eliminate_Advertisements
Last active July 23, 2025 00:25
Eliminate Spotify Advertisements + Complete Server List
##################################################################################
# ELIMINATE SPOTIFY ADS (VERSION 1.2 - 8.5) - ABANDONED FOR NOW #
##################################################################################
#
# NOTE: SOMETIMES ONLY ANNOUNCEMENT OF AN AD WHILE USING APP VERSION 7.5-7.9?-8.x.
# USING AN OFFICIAL OLDER VERSION SOLVES THIS. TEST IT (APKMIRROR). THIS WILL NOT
# OCCUR USING CHROMECAST / GOOGLE HOME.
#
# COULD NOT SOLVE THE AUDIO AD INRO/OUTRO IN THE APP.
# SUGGESTIONS? WRITE A COMMENT BELOW.
@AnirohDev
AnirohDev / fbrb.py
Created June 16, 2020 23:10
A Python script for extracting and archiving fbrb archives that are used by the Frostbite 1 engine. Created by Frankelstner.
###############################
# Created by Frankelstner #
###############################
# Edited by Heico #
###############################
from struct import pack,unpack
import gzip
from cStringIO import StringIO
import sys
@mwolter805
mwolter805 / create_group.yaml
Last active January 17, 2025 17:44
Home Assistant Blueprint: Create a group with either dynamic or with static members.
blueprint:
name: Create Group
description: |
# Create Group Blueprint
This blueprint creates a group with either static or dynamic members.
It has two main functions to add members
- Dynamically include multiple members based on a common string in their object ID's. (```Dynamic Include List```)
- Or statically add individual members. (```Static Entities To Add```)
@jeyaramashok
jeyaramashok / ocp-k8s-version.md
Last active May 27, 2025 09:13
openshift kubernetes version mapping
Red Hat OpenShift version Kubernetes version
4.15 1.28
4.14 1.27
4.13 1.26
4.12 1.25
4.11 1.24
4.10 1.23
4.9 1.22
4.8 1.21
@FCLC
FCLC / A not so brief discussion of Alder Lake, the new AVX512 FP 16 extensions, Sapphire Rapids, its history, and why it requires a custom kernel.md
Last active August 8, 2024 02:30
On AVX512 FP16, Alder Lake, custom kernels, and how "Mistakes were made" has never rang so true

Warning: This is going to be a long one.  

  

I'm assuming general knowledge of x86_64 hardware extensions, and some insight into the workings of large hardware vendors. 

Understanding why AVX512 is useful not only in HPC, but also for gamers in emulation, or more efficient use of executions ports is a bonus. 

You don't need to have published 2 dozen papers on optimizing compute architecture.