Skip to content

Instantly share code, notes, and snippets.

View INDIAN2020's full-sized avatar

Gogula Sivannarayana INDIAN2020

View GitHub Profile
@INDIAN2020
INDIAN2020 / how-to-detect-breakpoints-in-bootstrap-using-javascript.markdown
Created August 23, 2020 16:48
How to detect breakpoints in Bootstrap using JavaScript

How to detect breakpoints in Bootstrap using JavaScript

Responsive Bootstrap Toolkit provides an easy way of breakpoint detection in JavaScript, detecting changes in currently active breakpoint, as well as executing any breakpoint-specific JavaScript code.

A Pen by Maciej Gurban on CodePen.

License.

@INDIAN2020
INDIAN2020 / index.html
Created August 23, 2020 16:30
Opening type
<div class="foo">
<span class="letter" data-letter="A">A</span>
<span class="letter" data-letter="B">B</span>
<span class="letter" data-letter="C">C</span>
<span class="letter" data-letter="D">D</span>
<span class="letter" data-letter="E">E</span>
<span class="letter" data-letter="F">F</span>
<span class="letter" data-letter="G">G</span>
<span class="letter" data-letter="H">H</span>
<span class="letter" data-letter="I">I</span>
@INDIAN2020
INDIAN2020 / kube.txt
Created March 27, 2020 10:10
Kubernetes Lab
109. Solution: Lightning Lab1:
https://a2.udemycdn.com/2020-03-14_14-24-24-54992425603e88f9c32ed5a6e6fe7e11/WebHD_720p.mp4?nva=20200327140753&token=0d6154c352bba0210f264
111. Solution: Lightning Lab - 2:
https://mp4-a.udemycdn.com/2020-03-03_15-27-45-39ebdf3b71196b8e9c0fa2cd36514fc9/WebHD_720p.mp4?-ZagjAUmy-LFzaFABZcGsG_TAOAn4l00CsNw7B8eDMGTpN9SZQ_w_kAgaur28F9dSMd8RC41DN6E2n_Bd_pRJhWqFatiUMP3clw5P-fYCPl18M1Ls0OQ5oEnrEyONaH1SqS3nn7sHy1ckQk89BI6vmDo9ZruPhzVI9qSBglwTwPy8w
@INDIAN2020
INDIAN2020 / DevOps.txt
Created February 15, 2020 15:01
Download For DevOps
https://cdn7.git.ir/1397/03-07/Packtpub%20DevOps%20Fundamentals%20[Video]_git.ir.rar
https://cdn7.git.ir/1397/04-22/Packtpub%20Effective%20Jenkins%20Continuous%20Delivery%20with%20Jenkins%20Pipeline%20%5BVideo%5D_git.ir.rar
https://git.ir/packtpub-kubernetes-for-absolute-beginners-hands-on/
@INDIAN2020
INDIAN2020 / Cygwin.bat
Created January 24, 2020 18:48
starting cygwin from a specific folder, the path can be passed from windows, for example as a context-menu for folders. (you place "cygwin.bat" in your cygwin folder, replacing the old one, and run the reg file to add a context menu for each folder)
@echo off
:: set code-page for UTF-8 charset.
chcp 65001
:: normalise to fully qualified path. short path (8.3) is used for testing the path.
set FOLDER=%~s1
for /f %%a in ("%FOLDER%") do ( set "FOLDER=%%~fsa" )
:: verify existing folder.
if ["%FOLDER%"]==[""] ( goto RUN_STANDARD )
@INDIAN2020
INDIAN2020 / Laravel.xml
Created January 24, 2020 18:11 — forked from scrubmx/Laravel.xml
PhpStorm Laravel Code Style
<code_scheme name="Laravel">
<option name="SOFT_MARGINS" value="120" />
<CssCodeStyleSettings>
<option name="HEX_COLOR_LOWER_CASE" value="true" />
<option name="HEX_COLOR_SHORT_FORMAT" value="true" />
</CssCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="FIELD_PREFIX" value="" />
<option name="FILE_NAME_STYLE" value="CAMEL_CASE" />
function get_remote_file_size($url) {
$headers = get_headers($url, 1);
if (isset($headers['Content-Length']))
return $headers['Content-Length'];
//checks for lower case "L" in Content-length:
if (isset($headers['Content-length']))
return $headers['Content-length'];
# Those are the results for 2 000 000 runs, and here is the code I used:
<?php
require '../vendor/autoload.php';
// My small class to do benchmarks
// All it does is looping over every test x times and record the
// time it takes using `microtime(true)`
// Then, the percentage is calculated, with 100% being the quickest
class ParentClass {
function test() {
self::which(); // output 'parent'
$this->which(); // output 'child'
}
function which() {
echo 'parent';
}
}
<?php
class A {
public static function newStaticClass()
{
return new static;
}
public static function newSelfClass()