Skip to content

Instantly share code, notes, and snippets.

View mauron85's full-sized avatar

Marián Hello mauron85

View GitHub Profile
@mauron85
mauron85 / haiku
Last active May 8, 2023 13:28
OSX Sandbox profile for Haiku.app
#!/bin/bash
# Move Haiku.app to your profile Application folder
# so you don't accidentally run in outside sanbox
# Replace all references of /Users/finch with your username in haiku.sb!
# Always use this shell script to launch!
sandbox-exec -f ~/sandbox/haiku.sb ~/Applications/Haiku.app/Contents/MacOS/Haiku
@mauron85
mauron85 / README
Created March 3, 2018 14:11 — forked from rkusa/README
Install alpine linux on xhyve VM
# curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86_64/alpine-3.3.1-x86_64.iso
curl -LO http://wiki.alpinelinux.org/cgi-bin/dl.cgi/v3.3/releases/x86/alpine-3.3.1-x86.iso
# create hdd image (8GB)
dd if=/dev/zero of=hdd.img bs=1g count=8
# extract kernel and initramfs
brew install cdrtools
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/initramfs-grsec > initramfs-grsec
isoinfo -i alpine-3.3.1-x86.iso -J -x /boot/vmlinuz-grsec > vmlinuz-grsec
@mauron85
mauron85 / launchvnc.sh
Last active April 6, 2023 08:12
Launch vino vnc server without configuring it first
#!/bin/bash
# This script should have been runned by user (non root)
# In case of errors like cannot open display:
# 1. Change DISPLAY=:0 for actual working display
# 2. Check (and change) permissions of files and dirs in user home dir
# specialy when you run this script as root by accident
# sometimes dirs like .dconf may be owned as root.
# As result vino server will not run under user privileges
@mauron85
mauron85 / recnoisered.sh
Last active March 11, 2022 15:07
How to record and filter noise from mic in Linux
# Useful links
# https://stackoverflow.com/questions/42904441/pipe-sox-play-command-to-stdout
# http://www.zoharbabin.com/how-to-do-noise-reduction-using-ffmpeg-and-sox/
# Record some noise
sox -t alsa default -b 16 -r 44100 -e signed -t wav - -t wav /tmp/noise.wav
# or alternative with arecord
'use strict';
function noop() {}
let noopStorage = {
getItem: noop,
setItem: noop,
removeItem: noop,
}
function hasStorage(storageType) {
# Last Modified: Sat Jul 16 17:43:56 2011
#include <tunables/global>
profile dropbox /{usr/bin/dropbox,home/*/.dropbox-*/**,home/*/.dropbox-dist/dropboxd} {
#include <abstractions/base>
#include <abstractions/consoles>
#include <abstractions/dbus>
#include <abstractions/dbus-session>
#include <abstractions/gnome>
#include <abstractions/ibus>
This file has been truncated, but you can view the full file.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["MosaicComponent"] = factory();
else
root["MosaicComponent"] = factory();
})(this, function() {
# Make the zoom slider works as media keys next/prev
# for Microsoft Corp. Digital Media Keyboard 1.0A
# Should work with Ubuntu 16.04
#
# Instructions:
# Save this file as /etc/udev/hwdb.d/70-keyboard.hwdb
# sudo udevadm hwdb --update
# sudo udevadm control --reload
# replugg keyboard
#
# This should always be run last either in .bashrc or as a script in .bashrc.d
if [[ -z "$TMUX" ]]; then
tmux has-session &> /dev/null
if [ $? -eq 1 ]; then
exec tmux new
exit
else
exec tmux attach
exit
fi
@mauron85
mauron85 / react-virtualized.js
Last active February 23, 2017 22:05
react-virtualized with exported CollectionView
!function(root, factory) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("React"), require("React.addons.shallowCompare"), require("ReactDOM")) : "function" == typeof define && define.amd ? define([ "React", "React.addons.shallowCompare", "ReactDOM" ], factory) : "object" == typeof exports ? exports.ReactVirtualized = factory(require("React"), require("React.addons.shallowCompare"), require("ReactDOM")) : root.ReactVirtualized = factory(root.React, root["React.addons.shallowCompare"], root.ReactDOM);
}(this, function(__WEBPACK_EXTERNAL_MODULE_89__, __WEBPACK_EXTERNAL_MODULE_90__, __WEBPACK_EXTERNAL_MODULE_96__) {
/******/
return function(modules) {
/******/
/******/
// The require function
/******/
function __webpack_require__(moduleId) {