Skip to content

Instantly share code, notes, and snippets.

View 92arpitgoyal's full-sized avatar

Arpit Goyal 92arpitgoyal

View GitHub Profile
SSH
SSH keys
An SSH key allows you to establish a secure connection between your computer and GitLab. Before generating an SSH key in your shell, check if your system already has one by running the following command:
Windows Command Line:
type %userprofile%\.ssh\id_rsa.pub
GNU/Linux/Mac/PowerShell:
cat ~/.ssh/id_rsa.pub
If you see a long string starting with ssh-rsa, you can skip the ssh-keygen step.
if(someInfo){
return someInfo;
}
else{
someInfo = defaultInfo;
return someInfo;
}
someInfo = someInfo || defaultInfo;
if(a > b){
return a;
}else{
return b;
}
return (a > b) ? a : b;
//program for numbers divisible by 3 or 5 or both // changed the comment to have 'or' not 'and'
for(var i = 1; i<=25; i++)//initialising var i = 1 is fine as it will not be checked for in each loop where as if you use var in second part of for loop it is a check condition, will be checked on each loop
{
if(i%3 === 0 && i%5 !== 0) //read about differences between == and ===
{
console.log(i + " is divisible by 3"); //gives a more logical output of what we need
}
else if(i%5 === 0 && i%3 !== 0)
{
console.log(i + " is divisible by 5");
//reverseArray takes an array as argument and produces a new array that has the same elements in the inverse order*/
function reverseArray(array)
{
//var reverseArray = [], j;
var reverseOfArray = [];
for(var i = array.length-1 ; i>=0; i--)
{
reverseOfArray.push(array[i]);
//j = array[i]
//reverseArray.push(j)
/*!
* medium-editor-insert-plugin v2.1.1 - jQuery insert plugin for MediumEditor
*
* https://github.com/orthes/medium-editor-insert-plugin
*
* Copyright (c) 2014 Pavel Linkesch (http://linkesch.sk)
* Released under the MIT license
*/
this["MediumInsert"] = this["MediumInsert"] || {};
.calender{
.btn-default{
border-color: transparent;
}
.btn.btn-primary:active, .btn.btn-primary.active{
border-radius: 50%;
width: 34px;
height: 34px;
span.text-info{
color: #fff;
myApp.config(['$provide', Decorate]);
function Decorate($provide) {
$provide.decorator('$locale', function ($delegate) {
var value = $delegate.DATETIME_FORMATS;
value.SHORTDAY = [
"S",
"M",
"T",
"W",
myApp.config(['$provide', Decorate]);
function Decorate($provide) {
$provide.decorator('daypickerDirective', function ($delegate) {
var directive = $delegate[0];
directive.templateUrl = "custom-template/datepicker/day.html";
return $delegate;
});
$provide.decorator('monthpickerDirective', function ($delegate) {
var directive = $delegate[0];
<script id="template/datepicker/year.html" type="text/ng-template">
<table role="grid" class="calender" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">
<thead>
<tr>
<th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="mdi mdi-chevron-left"></i></button></th>
<th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>
<th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="mdi mdi-chevron-right"></i></button></th>
</tr>
</thead>
<tbody>