Skip to content

Instantly share code, notes, and snippets.

View cooljith91112's full-sized avatar
💬

Indrajith K L cooljith91112

💬
View GitHub Profile
LibJitsi.start();
MediaService mediaService = LibJitsi.getMediaService();
//I assume that I have a working video and audio MediaDevice
MediaDevice randomVideoDevice = createVideoDevice();
MediaDevice randomAudioDevice = createAudioDevice();
//I create the MediaFormat for each stream
MediaFormat videoFormat
Changing email providers does not solve the problem. Email is ***NOT usually*** encrypted at the protocol level. It is very likely better to just stick with Gmail sadly enough.
The only real resolution is to:
1. Never send sensitive information over traditional email without TNO PIE ([GnuPG](https://en.wikipedia.org/wiki/GNU_Privacy_Guard) or GPG).
This is extremely dangerous because:
1. Most services do not offer secure SMTP
1. Secure SMTP is vulnerable to downgrade attacks.
1. Use a secure, anonymous and decentralized alternative such as I2P-Bote or Bitmessage.
@cooljith91112
cooljith91112 / 0_reuse_code.js
Created February 1, 2016 04:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cooljith91112
cooljith91112 / gist:413023b805105cbaff3a
Created February 1, 2016 09:05 — forked from jineeshjohn/gist:2044414
Dynamic html table rows and column creation with jQuery
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<style>
table{
width:500px;
height:500px;
}
table td{
padding:10px;
margin:10px;
border:1px solid #ccc;
setBadge = function (text) {
if (process.platform === "darwin") {
app.dock.setBadge("" + text);
} else if (process.platform === "win32") {
var win = remote.getCurrentWindow();
if (text === "") {
win.setOverlayIcon(null, "");
return;
}
@cooljith91112
cooljith91112 / firebase_detect_data.js
Created May 16, 2016 07:54 — forked from anantn/firebase_detect_data.js
Firebase: Detecting if data exists. This snippet detects if a user ID is already taken
function go() {
var userId = prompt('Username?', 'Guest');
checkIfUserExists(userId);
}
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users';
function userExistsCallback(userId, exists) {
if (exists) {
alert('user ' + userId + ' exists!');
@cooljith91112
cooljith91112 / OpenSimplexNoise.java
Created June 5, 2016 18:26 — forked from KdotJPG/OpenSimplex2S.java
Visually axis-decorrelated coherent noise algorithm based on the Simplectic honeycomb.
/*
* OpenSimplex Noise in Java.
* by Kurt Spencer
*
* v1.1 (October 5, 2014)
* - Added 2D and 4D implementations.
* - Proper gradient sets for all dimensions, from a
* dimensionally-generalizable scheme with an actual
* rhyme and reason behind it.
* - Removed default permutation array in favor of
@cooljith91112
cooljith91112 / README.md
Created August 31, 2016 15:43 — forked from xavriley/README.md
Original NES Mario Theme for Sonic Pi

Making Chiptune Music using Sonic Pi v2.0

Warning: this might not work on a RaspberryPi yet

I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.

I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!

Getting the sounds of the NES chip

@cooljith91112
cooljith91112 / ambient.rb
Created August 31, 2016 15:45 — forked from xavriley/ambient.rb
Ambient piece in Sonic Pi using multiple pentatonic scales
live_loop :foo do
with_fx :echo, mix: 0.3 do
sample :elec_tick if spread(2,7).tick
pattern1 = (knit :a3, 1, :d3, 1, :g3, 1)
pattern2 = (knit :a3, 1, :d3, 1, :g3, 1, :a0, 1)
pattern3 = (knit :a3, 1, :d3, 1, :g3, 1, :a5, 1)
structure = (knit pattern1, 128, pattern2, 32, pattern3, 32).tick(:structure)
@cooljith91112
cooljith91112 / gist:3148aa2c5821ce40c81ba7a2b3581e2a
Created November 16, 2016 09:00 — forked from lperrin/gist:123be96bfff9d0a9697a
Removing Unwanted scope variable from memory
app.directive('faFastScroll', ['$parse', function ($parse) {
var Interval = function(min, max) {
this.min = min || 0;
this.max = max || 0;
};
Interval.prototype.clip = function(min, max) {
if(this.max <= min || this.min >= max) {
this.min = this.max = 0;