Skip to content

Instantly share code, notes, and snippets.

View arvindr21's full-sized avatar
💭
Meh

Arvind Ravulavaru arvindr21

💭
Meh
View GitHub Profile
@arvindr21
arvindr21 / git-checkout-pr
Created July 5, 2018 06:04 — forked from mandrizzle/git-checkout-pr
Easily checkout pull requests locally from Atlassian Bitbucket Server (Stash)
#!/bin/sh
# Usage: `git checkout-pr <pull-request-id>`
#
# Make this file executable and place in a $PATH directory
# The name of the file is important. It has to be named `git-checkout-pr` for the usage to be `git checkout-pr`
# Every pull request on stash has 2 branches. One is called `merge` which is a branch that is merged with its destination.
# The other is `from` which is the unmodified revision that was pushed. This script checks out the merge branch.
# If you want to checkout the pr that is not pre-merged with it's destination, change all occurances of `merge` to `from`
@arvindr21
arvindr21 / object-watch.js
Created June 21, 2018 04:32 — forked from riddy/object-watch.js
object.watch polyfill
/**
* DEVELOPED BY
* GIL LOPES BUENO
* gilbueno.mail@gmail.com
*
* LEARN HOW TO USE IT:
* http://watch.k6.com.br
* FORK:
* https://gist.github.com/1627705
*/
{
"_id" : ObjectId("5a0e85e97631420025479a18"),
"recieved_at" : ISODate("2017-11-17T12:17:05.039+05:30"),
"data" : "0;73;25.62;0;1.22;4.28;10.20;0;0;0;0;0",
"created_by" : ObjectId("5a0d6c1fbb87330025a9b091"),
"suitcase" : ObjectId("5a0e728e7631420025479a00"),
"source" : "machine",
"deviceTimeStamp" : ISODate("2017-11-17T06:47:04.330+05:30"),
"__v" : 0
}
{
"_id" : ObjectId("5a1d0ae7c72da80026f3fe6c"),
"created_at" : ISODate("2017-11-28T12:36:15.669+05:30"),
"updated_at" : ISODate("2017-12-06T18:48:27.323+05:30"),
"name" : "eco-switch-sixteen",
"codeName" : "eco-switch-sixteen",
"dataStructure" : "bol",
"created_by" : ObjectId("5947f8f8fffcd800080fd721"),
"outputs" : [],
"inputs" : [
{
"_id" : ObjectId("59afa7146c750e0025a67763"),
"created_at" : ISODate("2017-09-06T13:13:16.891+05:30"),
"updated_at" : ISODate("2018-01-11T13:08:26.290+05:30"),
"stage" : "tes",
"name" : "s-cube",
"codeName" : "s-cube",
"description" : "s-cube",
"dataStructure" : "b;i;l;t;x;y;z;md",
"created_by" : ObjectId("5947f8f8fffcd800080fd721"),
{
"_id" : ObjectId("5a39dff0f4aabb0026a0ff61"),
"created_at" : ISODate("2017-12-20T09:28:40.743+05:30"),
"updated_at" : ISODate("2018-02-15T11:45:41.883+05:30"),
"name" : "T1",
"created_by" : ObjectId("5a0d6e4dbb87330025a9b0a8"),
"rules" : [
{
"id" : "0230e155-3917-4195-ac52-3b03bbceab2a",
"if" : {
angular.module('TodoApp', [])
.controller('AppCtrl', function($scope, $rootScope, TodoRestService, TodoLSFactory, TodoDataFactory) {
// $scope.todos = TodoDataFactory.get();
$scope.$on('loadTodos', function($event, todos) {
// $scope.todos = TodoLSFactory.read();
if (todos) {
$rootScope.$broadcast('loadOtherCtrlTodos', todos);
@arvindr21
arvindr21 / XORCipher.js
Created December 12, 2017 04:22 — forked from sukima/XORCipher.js
A Super simple encryption cipher using XOR and Base64 in JavaScript
// XORCipher - Super simple encryption using XOR and Base64
//
// Depends on [Underscore](http://underscorejs.org/).
//
// As a warning, this is **not** a secure encryption algorythm. It uses a very
// simplistic keystore and will be easy to crack.
//
// The Base64 algorythm is a modification of the one used in phpjs.org
// * http://phpjs.org/functions/base64_encode/
// * http://phpjs.org/functions/base64_decode/

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@arvindr21
arvindr21 / delete-from-v2-docker-registry.md
Created November 29, 2017 04:44 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \