Skip to content

Instantly share code, notes, and snippets.

E:V:A E3V3A

Block or report user

Report or block E3V3A

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
@E3V3A
E3V3A / matlab-octave.m
Created Mar 25, 2019 — forked from gramian/matlab-octave.m
Octave and Matlab Snippets
View matlab-octave.m
%% Math %%
si = @(x) sin(x) ./ x; % cardinal sine without pi multiplied argument
hsin = @(x) 0.5*(1.0 - cos(x)); % haversed sine
hcos = @(x) 0.5*(1.0 + cos(x)); % haversed cosine
sigm = @(x,k) 0.5*tanh(0.5*k*x) + 0.5; % sigmoid function to (exp(-kx)+1)^-1
@E3V3A
E3V3A / mount-raspbian-image
Created May 11, 2018
Locally mounting a Raspberry Pi Raspbian Linux image
View mount-raspbian-image
#!/bin/bash
#
# Usage: sudo ./mount-raspbian-image <imagename>
#
if [ -z "$1" ]
then
echo "Usage: sudo ./mount-raspbian-image <imagename>"
exit
fi
@E3V3A
E3V3A / testApiKeyAndGoogleAuthLibrary.js
Created Apr 12, 2018 — forked from phsultan/testApiKeyAndGoogleAuthLibrary.js
Google Speech Recognition with API key + google-auth-library
View testApiKeyAndGoogleAuthLibrary.js
const fs = require('fs');
const { auth } = require('google-auth-library');
const API_KEY = 'ADD YOUR API KEY HERE';
const fileName = './audio.raw';
// Reads a local audio file and converts it to base64
const file = fs.readFileSync(fileName);
const audioBytes = file.toString('base64');
@E3V3A
E3V3A / protos.diff
Created Apr 12, 2018 — forked from phsultan/protos.diff
Google Speech Recognition with API key + gRPC
View protos.diff
--- node_modules/@google-cloud/speech/protos/google/cloud/speech/v1/cloud_speech.proto.orig 2018-04-12 11:44:01.000000000 +0200
+++ node_modules/@google-cloud/speech/protos/google/cloud/speech/v1/cloud_speech.proto 2018-04-12 11:44:51.000000000 +0200
@@ -35,7 +35,7 @@
// Performs synchronous speech recognition: receive results after all audio
// has been sent and processed.
rpc Recognize(RecognizeRequest) returns (RecognizeResponse) {
- option (google.api.http) = { post: "/v1/speech:recognize" body: "*" };
+ option (google.api.http) = { post: "/v1/speech:recognize" };
}
@E3V3A
E3V3A / compliments.json
Created Mar 11, 2018 — forked from ryck/compliments.json
MagicMirror compliments file
View compliments.json
{
"anytime" : [
"Hey there sexy!",
"I hope your day is as nice as your face!",
"Have you been working out?",
"I'm lucky to be your mirror!",
"The Force is strong with you",
"If I could high five you... I would!",
"On a scale from 1 to 10, you're an 15!",
"Being awesome is hard, but you'll manage",
@E3V3A
E3V3A / async-test.js
Created Feb 28, 2018 — forked from alexkrolick/async-test.js
Async-Await vs Promises in Node
View async-test.js
// Before April 2017 run this with flags:
// node --harmony-async-await ./async-test.js
function sayHi (name) {
if (name == null) throw Error('Missing name')
return `Hi ${name}.`
}
function sayWhatsUpAsync (msg, timeoutMs) {
console.log(`Will return in ${timeoutMs / 1000}s`)
View gist:3fe7ce9c2f4df2c0586767a6f2a10660
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Gr-gsm Livemon
# Author: Piotr Krysik
# Description: Interactive monitor of a single C0 channel with analysis performed by Wireshark (command to run wireshark: sudo wireshark -k -f udp -Y gsmtap -i lo)
# Generated: Mon Jul 18 18:08:34 2016
##################################################
# modified Jan 2017 lin_s for headless mode
@E3V3A
E3V3A / fastboot_commands.txt
Created Jun 4, 2017 — forked from zhuowei/fastboot_commands.txt
Huawei Nexus 6P Angler fastboot commands
View fastboot_commands.txt
List grabbed from running `strings` on the bootloader; it's probably incomplete.
Most of these commands are untested, and all of them sound like they can seriously break your phone. Be careful.
Tested: (all on a bootloader unlocked device)
fastboot oem uart enable: changes "Console" on the bootloader screen to say "ttyHSL0,115200,n8";
probably enables serial messages; haven't checked since I don't know where the Nexus 6P's uart is
fastboot oem ramdump enable: changes "Download mode" on the bootloader screen to say "ENABLED" instead of "DISABLED".
@E3V3A
E3V3A / getprop.java
Created Jan 11, 2017 — forked from nasitra/getprop.java
[android] getprop from Java
View getprop.java
// ref: https://groups.google.com/forum/#!topic/android-developers/M-g3LqIY_xM
private String getProperty(String name, String defaultValue) {
ArrayList<String> processList = new ArrayList<String>();
String line;
Pattern pattern = Pattern.compile("\\[(.+)\\]: \\[(.+)\\]");
Matcher m;
try {
Process p = Runtime.getRuntime().exec("getprop");
@E3V3A
E3V3A / cowroot.c
Created Oct 28, 2016 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
View cowroot.c
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
You can’t perform that action at this time.