Skip to content

Instantly share code, notes, and snippets.

@sbailliez
sbailliez / vagrant-vmware-tech-preview-apple-m1-pro.md
Last active April 10, 2024 07:51
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@ericbolo
ericbolo / rpi-jack-audio-output-to-input.md
Last active April 29, 2024 18:41
Bridging audio input (mic) to audio output (headphones) with JACK on Raspberry PI (Raspbian Jessie)

Introduction

This walks you through installing JACK, connecting a USB sound card, and copying the audio on the input port onto the output port. The result: you will hear what you say played back immediately from the headphones.

Installation

sudo pip install setuptools
sudo apt-get install python-dev

sudo apt-get install libffi-dev

@eddywebs
eddywebs / 01-expand.sh
Created April 24, 2016 02:03
auto expand rootfs on boot
sudo killall fbi >/dev/null 2>&1
dialog --infobox "\nWelcome to retro gaming console - First time boot ! hang tight - Resizing the filesystem ..." 5 60
sudo raspi-config nonint do_expand_rootfs >/dev/null 2>&1
sleep 2
dialog --infobox "\nDone. Rebooting now- ready to play in few moments..." 5 60
sudo rm -f /etc/profile.d/01-expand.sh
sleep 2
sudo reboot
@ihciah
ihciah / README.MD
Created January 19, 2016 05:49
Pwnable.kr Toddler's Bottle writeup

Pwnable.kr Toddler's Bottle writeup

ihciah@gmail.com

It has been a long time since I finish(nearly) these problems...

1. fd

In linux, 0 is std_input, 1 is std_output, 2 is std_error_output.

We just need to send LETMEWIN to std_input and set fd to 0 which means (our input - 0x1234) == 0.

@furkanmustafa
furkanmustafa / play-random-music.sh
Last active August 4, 2023 19:17
A simple script to play random mp3s in a folder
#!/bin/bash -e
PLAYER="mpv -vo null"
#PLAYER="mpg321"
MUSIC=$(find . -regextype posix-extended -iregex '.*(m4a|mp3|mp4|aac)$' | sort -R)
IFS=$'\n'
for file in $MUSIC
@daj
daj / BaseStatelessBlackBoxEspressoTest.java
Last active December 20, 2018 09:44 — forked from xrigau/AndroidManifest.xml
The set of changes required to disable animations any time Espresso tests run. These instructions will only work on emulators and on rooted devices. This is based on the instructions in: https://code.google.com/p/android-test-kit/wiki/DisablingAnimations
public abstract class BaseStatelessBlackBoxEspressoTest<T extends Activity> extends ActivityInstrumentationTestCase2<T> {
private SystemAnimations mSystemAnimations;
public BaseStatelessBlackBoxEspressoTest(Class clazz) {
super(clazz);
}
@Override
protected void setUp() throws Exception {
@dmp1ce
dmp1ce / start_transmission_daemon.sh
Created May 3, 2015 12:18
Start transmission-daemon and bind it to VPN IP address
#!/bin/bash
# Kill transmission-daemon if it is running
transmission_da_pid=$(pgrep transmission-da)
if [ $transmission_da_pid ]; then
killall transmission-daemon && echo "Closing existing tranmission-daemon processes ..." && sleep 8
fi
# Get VPN IP to bind to
bind_address=$(ip addr show tun0 | grep inet | awk '{print $2}')
@edenman
edenman / SpoonScreenshotAction.java
Last active May 17, 2017 16:12
Espresso ViewAction for Spoon Screenshot
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.view.View;
import com.squareup.spoon.Spoon;
import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
@lapastillaroja
lapastillaroja / DividerItemDecoration.java
Last active November 17, 2023 23:06 — forked from akmalxxx/DividerItemDecoration.java
DividerItemDecoration. RecyclerView.ItemDecoration simple implementation
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
@da667
da667 / gist:fc2a311803415740927e
Created December 9, 2014 15:28
simple analysis script - now with less CPU grinding.
#!/bin/bash
#analysis script
#goal: for each file that isn't a rar, tar, gz, txt, reg, bat or sh:
#make a directory, copy the malware into the directory, cd into the directory, run hashing tools, file, strings dump into file (separate file for strings output, because its obnoxiously long in most cases) go back to parent directory, rinse, repeat until done.
#also stores a hash file for each hash type done in one single master file in the parent directory (e.g. all_md5.txt, all_ssdeep.txt, etc.)
for i in `ls -1 | egrep -v "sh|bat|rar|tar|gz|txt|reg"`; do
filedir=`echo $i`_analysis
filetxt=`echo $i`_analysis.txt
filestr=`echo $i`_strings.txt
mkdir -p $filedir