Skip to content

Instantly share code, notes, and snippets.

Cristian Sandu crazyquark

Block or report user

Report or block crazyquark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@crazyquark
crazyquark / web-audio-fetch-stream.js
Created Jul 12, 2019 — forked from revolunet/web-audio-fetch-stream.js
Web Audio streaming with fetch API
View web-audio-fetch-stream.js
//
// loads remote file using fetch() streams and "pipe" it to webaudio API
// remote file must have CORS enabled if on another domain
//
// mostly from http://stackoverflow.com/questions/20475982/choppy-inaudible-playback-with-chunked-audio-through-web-audio-api
//
function play(url) {
var context = new (window.AudioContext || window.webkitAudioContext)();
@crazyquark
crazyquark / ds-duino.ino
Created May 10, 2019 — forked from dougalcampbell/ds-duino.ino
Digispark and nodejs - talking to the Digispark Arduino-compatible microcontroller via USB with the node-hid library
View ds-duino.ino
/*
* Accept control commands via USB.
*
* Commands start with '!' and end with '.'
* Commands have three parts: action, pin, value: !AAPPVV.
*
* E.g. '!01p101.' is DigitalWrite, Pin1, value = 1
*
* Note: This is currently *very* crude. Much improvement could be made.
* I think the use of strncpy is eating a lot of memory. Refactor?
@crazyquark
crazyquark / multiple_ssh_setting.md
Created Mar 22, 2019 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@crazyquark
crazyquark / iTunes12-Wine-Ubuntu.txt
Created May 10, 2018 — forked from schorschii/iTunes12-Wine-Ubuntu.txt
How to install iTunes 12 on Linux Mint 18 with working Store
View iTunes12-Wine-Ubuntu.txt
Trying to run iTunes with Wine, i faced various problems. Here is a working solution how to install iTunes on Debian-based systems (in my case Linux Mint 18.1) - with support for the iTunes Store. Warning: Syncing i-devices is still not possible.
When installing it with the playonlinux-"iTunes 12"-script, log in into the Store was not possible in my case. Wine showed the follwing error when trying to log in: SecurityContext failed with error 0x80090304
1. Install current Wine version (2.0.1) directly from the winehq repository
wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
sudo apt-get update
sudo apt-get install --install-recommends winehq-stable
wine --version
@crazyquark
crazyquark / index.html
Created Apr 30, 2018 — forked from bellbind/index.html
[threejs] simplified gltf2 loader example
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://unpkg.com/three"></script>
<script
src="https://unpkg.com/three/examples/js/loaders/GLTF2Loader.js"
></script>
<script src="script.js" defer="defer"></script>
</head>
@crazyquark
crazyquark / gist:ef6172da915a1b0803d41465b924d92a
Created Feb 1, 2017 — forked from alphazo/gist:3303282
Clone MiFare cards using chinesse UUID writable cards
View gist:ef6172da915a1b0803d41465b924d92a

libnfc supports UUID writable cards and even has some dedicated tools for them.

However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.

Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.

Patch & recompile libnfc

The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):

  // Try to write the trailer
@crazyquark
crazyquark / .gitconfig
Created Jul 12, 2016 — forked from samsalisbury/.gitconfig
Git diff and merge with p4merge (OSX)
View .gitconfig
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
@crazyquark
crazyquark / filebot-on-odroid
Created Mar 25, 2016 — forked from hongkongkiwi/filebot-on-odroid
Installing filebot on odroid
View filebot-on-odroid
sudo apt-get -y install openjdk-8-jre-headless mediainfo libchromaprint-tools
#Bug in ca-certificates-java
sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
sudo mkdir -p /usr/share/filebot/bin
sudo mkdir -p /usr/share/filebot/data
sudo wget http://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar/download -O /usr/share/filebot/FileBot.jar
sudo bash -c "cat <<EOT > /usr/share/filebot/bin/filebot.sh
#!/bin/sh
java -Dunixfs=false -DuseGVFS=false -DuseExtendedFileAttributes=false -Dfile.encoding=UTF-8 -Dsun.net.client.defaultConnectTimeout=10000 -Dsun.net.client.defaultReadTimeout=60000 -Dapplication.deployment=ipkg -Dapplication.analytics=true -Duser.home=/usr/share/filebot/data -Dapplication.dir=/usr/share/filebot/data -Djava.io.tmpdir=/usr/share/filebot/data/temp -Djna.library.path=/usr/share/filebot -Djava.library.path=/usr/share/filebot -Dnet.sourceforge.filebot.AcoustID.fpcalc=/usr/bin/fpcalc -jar -Xmx400M /usr/share/filebot/FileBot.jar \"\\\$@\"
EOT"
View gist:e92e67275dea6501fed9
(spindle)chris@ubuntu:~/Desktop/fbtft-spindle/spindle$ ../fbtft-stage0 2014-06-20-wheezy-raspbian.zip
+ . ./common
+ set -e
+ . ./config
+ RASPBIAN=1
+ [ -n 1 ]
+ TGT_ARCH=armhf
+ DEB_MIRROR=http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/
+ NBD_DEV=/dev/nbd0
+ BOOT_DEV=/dev/nbd0p1
You can’t perform that action at this time.