Skip to content

Instantly share code, notes, and snippets.

Rocky Jaiswal rocky-jaiswal

Block or report user

Report or block rocky-jaiswal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rocky-jaiswal
rocky-jaiswal / mejs_playbackrate_plugin
Last active Jun 10, 2019
Media Element JS plugin to modify video playback speed.
View mejs_playbackrate_plugin
//Copy this plugin and add 'fasterslower' to the features array. Also write the CSS :)
(function($) {
$.extend(mejs.MepDefaults, {
fasterslowerText: 'Faster/Slower'
});
$.extend(MediaElementPlayer.prototype, {
buildfasterslower: function(player, controls, layers, media) {
@rocky-jaiswal
rocky-jaiswal / prod_cons_actors.rb
Created Jun 24, 2013
Producer Consumer with Actors
View prod_cons_actors.rb
require 'celluloid/autostart'
class Cook
include Celluloid
def produce(manager)
manager.async.inform("produced")
end
end
View es-full.yml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluentd-es
namespace: kube-system
labels:
k8s-addon: logging-elasticsearch.addons.k8s.io
k8s-app: fluentd-es
kubernetes.io/cluster-service: "true"
version: v1.22
View Gruntfile2.js
// Generated on 2013-10-24 using generator-angular 0.5.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest;
var mountFolder = function (connect, dir) {
View gist:7113077
// Generated on 2013-10-22 using generator-angular 0.5.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@rocky-jaiswal
rocky-jaiswal / Gemfile.lock
Created Dec 21, 2015
Gemfile.lock for a new Rails 5 (API only) project
View Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.0.beta1)
actionpack (= 5.0.0.beta1)
celluloid (~> 0.17.2)
coffee-rails (~> 4.1.0)
em-hiredis (~> 0.3.0)
faye-websocket (~> 0.10.0)
redis (~> 3.0)
@rocky-jaiswal
rocky-jaiswal / prod_cons.rb
Created Jun 24, 2013
Producer Consumer problem with locks
View prod_cons.rb
class Cook
def produce
"item"
end
end
class Consumer
def consume(item)
#do something with item
end
View backbone_example.html
<h1>Find Users</h1>
<form action="find" method="get">
<input type="text" placeholder="Enter Name" id="user-input"/>
</form>
<div id="user-selection" style="margin-top:10px;"></div>
<script>
$(function() {
var User = Backbone.Model.extend({});
You can’t perform that action at this time.