This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jsonData = pm.response.json(); | |
pm.environment.set("jwt", jsonData.access_token); | |
function parseJwt (token,part) { | |
var base64Url = token.split('.')[part]; | |
var words = CryptoJS.enc.Base64.parse(base64Url); | |
var jsonPayload = CryptoJS.enc.Utf8.stringify(words); | |
return JSON.parse(jsonPayload); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.irfan.rest; | |
import org.springframework.boot.actuate.health.HealthEndpoint; | |
import org.springframework.http.MediaType; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Secure workaround for https://issues.sonatype.org/browse/MVNCENTRAL-1369 | |
# Navigate to the root of your Spring Boot project where a Maven wrapper is present and run this script | |
cd .mvn/wrapper | |
wget https://gist.githubusercontent.com/kbastani/d4b4c92969ec5a22681bb3daa4a80343/raw/f166086ef051369383b02dfb74317cd07b6f2c6e/settings.xml | |
cd ../../ | |
./mvnw clean install -s .mvn/wrapper/settings.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Expand | |
const sectionEl = document.querySelector("section[data-purpose='sidebar']"); const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']"); checkboxes.forEach((checkbox) => { if (!checkbox.checked) { checkbox.disabled = false; checkbox.click(); } }); | |
## Mark as Complete | |
const checkboxes = document.querySelectorAll("input[type='checkbox']"); | |
checkboxes.forEach((checkbox) => { | |
if(!checkbox.checked) { | |
checkbox.click();}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find add 'node_modules' | |
find . -name "node_modules" -type d -prune -print | xargs du -chs | |
# Delete all | |
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://github.com/Ortanon/mongo | |
docker pull karimtemple/mongo | |
mkdir db && sudo chmod 777 db | |
docker run --platform linux/amd64 --name mongodb --rm -d -p 27017:27017 --user 202:202 -v $(pwd)/db:/data/db karimtemple/mongo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# Modified from the gist here https://gist.github.com/bartoszmajsak/1396344 | |
# | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
RED="\033[1;31m" | |
GREEN="\033[1;32m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# subl /usr/local/etc/php/7.3/conf.d/ext-xdebug.ini | |
[xdebug] | |
xdebug.mode = debug | |
xdebug.max_nesting_level = 1000 | |
xdebug.start_with_request=yes | |
xdebug.client_port=9090 | |
xdebug.client_host=127.0.0.1 | |
xdebug.discover_client_host=1 | |
xdebug.idekey=PHPSTORM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// paste this file in root folder of your project | |
// and run command "valet link ." | |
class LocalValetDriver extends LaravelValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum update | |
# Installing ZSH | |
sudo yum -y install zsh | |
# Check ZSH has been installed | |
zsh --version | |
# Install "util-linux-user" because "chsh" is not available by default | |
# See https://superuser.com/a/1389273/599050 |
NewerOlder