Skip to content

Instantly share code, notes, and snippets.

@manishval
manishval / export_sns_topic_subscriptions.rb
Created April 20, 2017 12:15
Export AWS SNS Topic Subscriptions
@client = AWS::SNS::Client.new(
region: 'AWS_SNS_REGION',
access_key_id: 'AWS_SNS_KEY_ID',
secret_access_key: 'AWS_SNS_ACCESS_KEY'
)
fetch_more = true
next_token = nil
subscriptions = []
@manishval
manishval / export_sns_application_endpoints.rb
Last active November 21, 2019 15:26
Export AWS SNS application endpoints
@client = AWS::SNS::Client.new(
region: 'AWS_SNS_REGION',
access_key_id: 'AWS_SNS_KEY_ID',
secret_access_key: 'AWS_SNS_ACCESS_KEY'
)
fetch_more = true
next_token = nil
endpoints = []
<iframe id='su-ivp' src='https://streamup.com/username/live/embed' scrolling='no' frameborder='0' marginwidth='0' allowFullScreen='true' marginheight='0' allowTransparency='true' seamless style='border: none; overflow: hidden; width: 100%; height: 100%; position: absolute;' width='100%'></iframe>
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo rpi-update
sudo apt-get install -y xrdp
sudo apt-get install -y tightvncserver
sudo apt-get install -y mysql-server
sudo apt-get install -y scrot
sudo apt-get install -y samba samba-common-bin
@manishval
manishval / gist:28b57a6872b2d5b968a0
Created March 19, 2015 17:17
Script to Install JAVA 8 (JDK 8u40) on CentOS/RHEL 7/6/5 and Fedora
#!/bin/bash
# Script to Install JAVA 8 (JDK 8u40) on CentOS/RHEL 7/6/5 and Fedora
# http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/
echo "Installing Java 8 (64bit)"
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz"
tar xzf jdk-8u40-linux-x64.tar.gz
RTMP redirection
To add RTMP redirection functionality to the Load Balancer, configure the load-balancing system, and then add the following module to the Application.xml file for any live or VOD application on the Load Balancer. Be sure to add it "after" the last <Module> that's included in the <Modules> section in Application.xml. The following example shows an RTMP redirection module named redirect:
<Module>
<Name>Redirect</Name>
<Description>Redirect</Description>
<Class>com.wowza.wms.plugin.loadbalancer.redirect.ClientConnections</Class>
</Module>
This module returns an RTMP redirect to clients that connect to the Load Balancer, except for those that are configured to be ignored in the loadbalanceIgnoreClients property in the Server.xml file. Wowza edge servers that connect to a Load Balancer that's also an origin server in a live stream repeater (origin/edge) configuration are also ignored.

Add the following HTML to the homepage, immediately after the <body> tag.

<script src="//f.vimeocdn.com/js/froogaloop2.min.js"></script>
<div class="mask" style="display: none;">&nbsp;</div>
<div class="popup-video" style="display: none;">
<iframe id="vimeo-player" src="//player.vimeo.com/video/115014610?title=0&byline=0&api=1&player_id=vimeo-player&portrait=0" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
/*
Bootstrap v3.3.1 (http://getbootstrap.com)
Copyright 2011-2014 Twitter, Inc.
Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*
NOTE:
This file has Normalize.css removed.
@manishval
manishval / keybase.md
Created August 25, 2014 13:55
keybase.md

Keybase proof

I hereby claim:

  • I am manishval on github.
  • I am manishval (https://keybase.io/manishval) on keybase.
  • I have a public key whose fingerprint is 920C F29A A7C4 73C2 43CE 27E9 EEC1 5D0F 63D1 2E28

To claim this, I am signing this object:

@manishval
manishval / gist:10383102
Last active August 29, 2015 13:58
Display all Font on iOS
NSArray *fontFamilies = [UIFont familyNames];
for (int i = 0; i < [fontFamilies count]; i++)
{
NSString *fontFamily = [fontFamilies objectAtIndex:i];
NSArray *fontNames = [UIFont fontNamesForFamilyName:[fontFamilies objectAtIndex:i]];
NSLog (@"%@: %@", fontFamily, fontNames);
}