Skip to content

Instantly share code, notes, and snippets.

View alex-alex2006hw's full-sized avatar

alex-alex2006hw

View GitHub Profile
@alex-alex2006hw
alex-alex2006hw / install_ffmpeg_ubuntu.sh
Created November 10, 2015 06:52 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@alex-alex2006hw
alex-alex2006hw / introrx.md
Created November 29, 2015 02:28 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@alex-alex2006hw
alex-alex2006hw / https.py
Created December 12, 2015 00:28 — forked from stephenlb/https.py
HTTPS Server - All-in-One Secure HTTPS Server
#!/usr/bin/python
# server
# python https.py
#
# browser
# https://0.0.0.0:4443
import BaseHTTPServer
import SimpleHTTPServer
@alex-alex2006hw
alex-alex2006hw / README
Created January 5, 2016 17:59 — forked from t2-support-gists/README
SMS Ruby RESTFul App 1
AT&T API Platform Sample Apps
--------------------------------------
This file describes how to set up, configure and run the Ruby sample
applications using the AT&T API Platform services. It covers all steps
required to register the applications on DevConnect as well as running the
sample applications locally.
1. Configuration
2. Installation

How to get facebook login working with Meteor and Cordova on iOS

Step 1: Make your local dev site internet accessible

Because there is an issue with OAuth2 login and localhost development, you currently have to deploy your meteor site to be able to test the Facebook login. A nice little workaround for this is to make the local instance of meteor accessible externally.

There is a great online guide for setting up port forwarding with your router and you can check your public external IP here.

For example, If you have an Apple router, simply open up Airport Utility on your Mac and click edit on your router, then go to the Network tab. Under Port Settings click the + icon and select Personal Web Sharing, setting all of the public and private ports to 3000. Make sure the private IP is set to your current computer IP.

@alex-alex2006hw
alex-alex2006hw / sshpub-to-rsa
Created January 13, 2016 07:11 — forked from thwarted/sshpub-to-rsa
converts an openssh RSA public key into a format usable by openssl rsautl (if you don't have openssh 5.6 or later with ssh-keygen PEM export format)
#!/usr/bin/env python
# with help and inspiration from
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure)
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html
import sys
import base64
import struct
@alex-alex2006hw
alex-alex2006hw / Enhance.js
Created May 16, 2016 01:49 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@alex-alex2006hw
alex-alex2006hw / better-nodejs-require-paths.md
Created October 7, 2016 22:36 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@alex-alex2006hw
alex-alex2006hw / js-crypto-libraries.md
Created January 10, 2017 03:04 — forked from jo/js-crypto-libraries.md
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

I start with a list and plan to create a comparison table.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@alex-alex2006hw
alex-alex2006hw / AvcEncoder.java
Created May 7, 2017 08:02 — forked from wobbals/AvcEncoder.java
MediaCodec encoder sample
package com.opentok.media.avc;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
public class AvcEncoder {