Skip to content

Instantly share code, notes, and snippets.

@karanlyons
karanlyons / ZoomDaemon.yara
Last active July 12, 2021 14:07
Fixes for Zoom, RingCentral, Zhumu (and additional white labels) RCE vulnerabilities
private rule Macho
{
meta:
description = "private rule to match Mach-O binaries (copied from Apple's XProtect)"
condition:
uint32(0) == 0xfeedface or uint32(0) == 0xcefaedfe or uint32(0) == 0xfeedfacf or uint32(0) == 0xcffaedfe or uint32(0) == 0xcafebabe or uint32(0) == 0xbebafeca
}
rule ZoomDaemon
{
@urjeetpatel
urjeetpatel / gist:60cee1e7dc509ead24e99f70de3b5bd7
Last active April 19, 2022 18:27 — forked from bergantine/gist:1119284
Python Random Password Generator (One Liner). #python #password
python -c "LENGTH=15;from secrets import choice;from string import printable; print(''.join([choice(printable.strip()) for i in range(LENGTH)]))"
@terabyte
terabyte / amazon.md
Created December 6, 2017 02:27
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@kuznero
kuznero / install-from-channels-nix.md
Last active April 25, 2021 19:05
How to build haskell project in NixOS with stack

In order to upgrade Haskell stack tool on NixOS without enabling nixos-unstable for all packages it is possible to install just one single package from unstable channel like following:

nix-env -f https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz -iA stack

If it happens that it is still older version, try unstable-small channel instead which gets updated more often:

nix-env -f https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable-small.tar.gz -iA stack
@mbbx6spp
mbbx6spp / 00README.adoc
Last active February 8, 2021 01:39
My ${HOME}/.nixpkgs/config.nix to setup my dev and desktop environments the way I like them :)

User env setup

Setup your user environment just the way you want with Nix.

  1. Add packageOverrides to the attrset returned by your ${HOME}/.nixpkgs/config.nix (see my example above).

  2. Then with one command you can setup your whole environment: nix-env -i desktop-mbbx6spp.

Then all you need is a simple ~/.bash_profile script like so:

@maxim
maxim / gh-dl-release
Last active March 29, 2024 16:41
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@huonw
huonw / main.rs
Created October 13, 2015 06:25 — forked from RustyRails/main.rs
Challenge #236 [Easy] Random Bag System
extern crate rand;
use rand::Rng;
struct Bag {
contents: Vec<char>,
rng: rand::ThreadRng,
}
impl Bag {
@ccbrown
ccbrown / DumpHex.c
Last active March 27, 2024 17:32
Compact C Hex Dump Function w/ASCII
#include <stdio.h>
void DumpHex(const void* data, size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
for (i = 0; i < size; ++i) {
printf("%02X ", ((unsigned char*)data)[i]);
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') {
ascii[i % 16] = ((unsigned char*)data)[i];
{ config, pkgs, ... }:
{
require = [
<nixos/modules/programs/virtualbox.nix>
./hardware.nix
./monitors.nix
# ./mailpile.nix
];
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: