Skip to content

Instantly share code, notes, and snippets.

View E3V3A's full-sized avatar

E:V:A E3V3A

View GitHub Profile
@E3V3A
E3V3A / testApiKeyAndGoogleAuthLibrary.js
Created April 12, 2018 14:05 — forked from phsultan/testApiKeyAndGoogleAuthLibrary.js
Google Speech Recognition with API key + google-auth-library
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 / mount-raspbian-image
Created May 11, 2018 20:05
Locally mounting a Raspberry Pi Raspbian Linux image
#!/bin/bash
#
# Usage: sudo ./mount-raspbian-image <imagename>
#
if [ -z "$1" ]
then
echo "Usage: sudo ./mount-raspbian-image <imagename>"
exit
fi
@E3V3A
E3V3A / matlab-octave.m
Created March 25, 2019 22:32 — forked from gramian/matlab-octave.m
Octave and Matlab Snippets
%% 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 / getprop.java
Created January 11, 2017 14:10 — forked from nasitra/getprop.java
[android] getprop from 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 / feels_like.py
Created February 1, 2022 19:20
Functionas and formuals for calculating the "Feels Like" temperature using SI units
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Author: E:V:A
# Date: 2022-02-01
# Last: 2022-02-01
# Repo/Bugs: https://github.com/E3V3A/iata-arrivals-cli
# Version: 1.0.2 (pyflightdata-0.8.5)
# Codec: utf_8
# License: GPLv3
@E3V3A
E3V3A / compliments.json
Created March 11, 2018 17:59 — forked from ryck/compliments.json
MagicMirror compliments file
{
"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",