Skip to content

Instantly share code, notes, and snippets.

@mjnaderi
mjnaderi / android_storage_ssh.md
Last active May 28, 2024 07:32
Access Android Storage Remotely using Termux and SSH
@arcao
arcao / Arduino StringStream.md
Last active October 19, 2023 19:44
StringStream class / Library for Arduino

StringStream class / Library for Arduino

This piece of code is usable when you need Stream object which has to store/load data to/from Arduino String object.

Source (StringStream.h)

#ifndef _STRING_STREAM_H_
#define _STRING_STREAM_H_

#include <Stream.h>
@philipz
philipz / gist:04a9a165f8ce561f7ddd
Created March 9, 2015 03:17
Debian ARM64 (Aarch64) image for QEMU
QEMU version: 2.2.0
HDD init: qemu-img create -f qcow debian8-arm64.img 10G

Netinstall initrd: http://ftp.ru.debian.org/debian/dists/jessie/main/installer-arm64/20150107/images/netboot/debian-installer/arm64/initrd.gz
Netinstall kernel: wget http://ftp.ru.debian.org/debian/dists/jessie/main/installer-arm64/20150107/images/netboot/debian-installer/arm64/linux

Netinstall start:
 qemu-system-aarch64 -machine virt -cpu cortex-a57 -nographic -smp 1 -m 512 -kernel linux -initrd initrd.gz -append "root=/dev/ram console=ttyAMA0" -global virtio-blk-device.scsi=off -device virtio-scsi-device,id=scsi -drive file=debian8-arm64.img,id=rootimg,cache=unsafe,if=none -device scsi-hd,drive=rootimg -netdev user,id=unet -device virtio-net-device,netdev=unet -net user
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@inspirit
inspirit / Convolution.hpp
Created October 2, 2013 08:26
Separable Convolution and Gaussian Blur
#pragma once
#ifndef CONVOLUTION_H_INCLUDED
#define CONVOLUTION_H_INCLUDED
/**
* Separable Convolution routines with SSE and NEON intrinsics
*
* this implementation is based on OpenCV Filter Class
* with template optimizations and SIMD intrinsic
*
@ybakos
ybakos / GraphicGlDemoActivity.java
Created November 27, 2012 00:52
A simple example of using an Android Renderer to illustrate OpenGL ES boilerplate.
/* GraphicGlDemoActivity.java
* Author: Yong Bakos
* Since: 11/26/2012
* Thanks to:
* Cube: http://intransitione.com/blog/create-a-spinning-cube-with-opengl-es-and-android/
* OpenGL Boilerplate: http://www.jayway.com/2009/12/03/opengl-es-tutorial-for-android-part-i/
*/
package com.humanoriented.sudoku;
import java.nio.ByteBuffer;
@asanoboy
asanoboy / makewav.js
Created October 30, 2012 11:39
How to make a WAV file in Javascript.
var Wav = function(opt_params){
/**
* @private
*/
this._sampleRate = opt_params && opt_params.sampleRate ? opt_params.sampleRate : 44100;
/**
* @private
*/
@sgergely
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name