Skip to content

Instantly share code, notes, and snippets.

View Sandip124's full-sized avatar
💬
Thinking

Sandip Chaudhary Sandip124

💬
Thinking
View GitHub Profile
@Sandip124
Sandip124 / .block
Created January 20, 2019 11:13
Polar Clock
license: mit
const preload = Preload();
preload.fetch([
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4',
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4',
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4'
]).then(result => {
// use either a promise or 'oncomplete'
});
@Sandip124
Sandip124 / Git Snippets.md
Last active April 21, 2021 03:06
Git Snippets

Stage All Delete files

git rm $(git ls-files --deleted) 
OR
git add  `git ls-files --deleted`

Unstage File in git

git reset -- fileName
Example: git reset -- index.html
@Sandip124
Sandip124 / git_clean_fxd_command.bat
Created February 6, 2020 06:15 — forked from JoaoMotondon/git_clean_fxd_command.bat
Windows batch script that searches for git repositories in a given directory and executes "git clean -fxd" command in all of them (except those which have untracked files)
@echo off
REM We need to delay expansion, otherwise variables inside 'for' block will get replaced when the batch processor reads them in the 'for' loop, before it is executed.
REM See this link for details: https://stackoverflow.com/questions/5615206/windows-batch-files-setting-variable-in-for-loop
setlocal enabledelayedexpansion
REM Iterate over all git repositories
for /f %%l in ('find . -name ".git"') do (
echo Checking dir:%%~dpnl
@Sandip124
Sandip124 / git-aliases.txt
Created March 30, 2020 05:32 — forked from kristofferh/git-aliases.txt
List all git aliases
List just aliases
$ git config --get-regexp alias
List all config parameters
$ git config --list
Observable<String> database = Observable //Observable. This will emit the data
.just(new String[]{"1", "2", "3", "4"}); //Operator
Observer<String> observer = new Observer<String>() {
@Override
public void onCompleted() {
//...
}
@Override
@Sandip124
Sandip124 / jwt_decode.php
Created April 9, 2020 08:37 — forked from ahgood/jwt_decode.php
Get payload data from JWT token.
<?php
/**
* JSON Web Token implementation
*
* Minimum implementation used by Realtime auth, based on this spec:
* http://self-issued.info/docs/draft-jones-json-web-token-01.html.
*
* @author Neuman Vong <[email protected]>
*/
class JWT
/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2013
*/
!function (name, definition) {
if (typeof define == 'function') define(definition)
else if (typeof module != 'undefined' && module.exports) module.exports['browser'] = definition()
else window[name] = definition()