Skip to content

Instantly share code, notes, and snippets.

View mswietlicki's full-sized avatar

Mateusz Świetlicki mswietlicki

View GitHub Profile
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 19, 2024 07:24
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@devoncrouse
devoncrouse / clean_audio.sh
Created May 7, 2013 17:02
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@agrocholski
agrocholski / GetBitmapFromThumbnail.cs
Last active December 12, 2015 12:19
How to get a bitmap image from a file that can be used in your Windows Store UI
public async Task<BitmapImage> GetBitmapFromThumbnail(StorageFile storageFile)
{
//get the thumbnail in VideoView
var thumbnail = await storageFile.GetThumbnailAsync(Windows.Storage.FileProperties.ThumbnailMode.VideosView);
//get the stream from the thumbnail
var thumbnailStream = thumbnail.CloneStream();
//create the bitmap from the stream
var bitmapImage = new BitmapImage();
@tpaulus
tpaulus / PythonInstall3
Created December 28, 2012 00:45
Install the Raspberry Pi GPIO (General Purpose Input/Ouput) library
sudo pip install RPi.GPIO
@hoest
hoest / profile.ps1
Created October 23, 2012 11:47
Keep Powershell history
# profile folder
$profileFolder = split-path $profile
# save last 100 history items on exit; with the 'exit' command
$historyPath = Join-Path $profileFolder "ps_history.xml"
# hook powershell's exiting event and hide the registration with -supportevent.
Register-EngineEvent -SourceIdentifier powershell.exiting -SupportEvent -Action {
Get-History -Count 100 | Export-Clixml (Join-Path $profileFolder "ps_history.xml") }
@flakas
flakas / hc-sr04.ino
Created August 8, 2012 12:41
Modified Arduino Ping))) example to work with 4-Pin HC-SR04 Ultrasonic Sensor Distance Measuring Module
/* HC-SR04 Sensor
https://www.dealextreme.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
This sketch reads a HC-SR04 ultrasonic rangefinder and returns the
distance to the closest object in range. To do this, it sends a pulse
to the sensor to initiate a reading, then listens for a pulse
to return. The length of the returning pulse is proportional to
the distance of the object from the sensor.
The circuit:
@panesofglass
panesofglass / RouteTester.fsx
Created October 8, 2010 16:32
A sitemap-based url tester that runs in parallel (F#).
module RouteTester
#r "FSharp.PowerPack"
#r "System.Xml"
#r "System.Xml.Linq"
open System
open System.Diagnostics
open System.IO
open System.Net