Skip to content

Instantly share code, notes, and snippets.

View edvilme's full-sized avatar
🏠
Working from home

Eduardo Villalpando Mello edvilme

🏠
Working from home
View GitHub Profile
@jesster2k10
jesster2k10 / Fade.tsx
Created July 4, 2019 20:52
React Native iOS 11 Style Large Title with Support For Search Component & Menu Buttons
import React, { Component } from 'react'
import { Animated, StyleProp, ViewStyle } from 'react-native'
export type FadeDirection = 'up' | 'down'
interface FadeProps {
visible?: boolean
style?: StyleProp<ViewStyle>
children: React.ReactNode
direction?: FadeDirection
@YuxiUx
YuxiUx / midi-note-to-freq.md
Last active May 20, 2023 07:09
How to convert midi note to frequency in C, C++, Python, JS and PHP

JS

function noteToFreq(note) {
    let a = 440; //frequency of A (coomon value is 440Hz)
    return (a / 32) * (2 ** ((note - 9) / 12));
}

PHP

function noteToFreq($note) {
@alejandrolechuga
alejandrolechuga / oauth.js
Created November 18, 2016 15:24 — forked from keiver/oauth.js
Get Authentication header with OAuth using oauth-1.0a and crypto-js
import OAuth from 'oauth-1.0a';
import CryptoJS from 'crypto-js';
/**
* oAuthHeader - Get Authentication header with OAuth.
*
* @param {string} url Request URL
* @param {string} method HTTP method.
* @return {object} Authentication header object
*/
@tzmartin
tzmartin / embedded-file-viewer.md
Last active May 1, 2024 14:41
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@richard512
richard512 / ffmpeg-convert.sh
Last active December 22, 2022 01:45
ffmpeg merge and convert between webm, wav, and opus
#/bin/bash
# ffmpeg convert wav audio to opus audio
ffmpeg -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.opus
# ffmpeg combine webm and wav into a new webm with opus audio
ffmpeg -i uploads/video.webm -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.webm
@evansims
evansims / example.html
Last active February 5, 2024 16:52
Embedding or sharing a image or photo uploaded to Google Drive.
<a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a>
@nicoguaro
nicoguaro / plotdf.py
Last active December 16, 2022 08:29
Plot the vector field for an autonomous ODE written in the form x' = F(x,y), y' = G(x,y).
import numpy as np
from matplotlib import pyplot as plt
def plotdf(f, xran=[-5, 5], yran=[-5, 5], grid=[21, 21], color='k'):
"""
Plot the direction field for an ODE written in the form
x' = F(x,y)
y' = G(x,y)
The functions F,G are defined in the list of strings f.
@yurivictor
yurivictor / favorites.py
Created June 11, 2012 21:26
Get favorites/likes from various APIs
import json
import requests
def get_twitter_favorites():
# SET UP VARIABLES
SCREEN_NAME = 'yurivictor' # Please change this
BASE_URL = "https://api.twitter.com/1/favorites.json?screen_name="
URL = BASE_URL + SCREEN_NAME