Skip to content

Instantly share code, notes, and snippets.

View bramburn's full-sized avatar
🩰
Working on some Angular packages...sadly not on github....

Bhavesh Ramburn bramburn

🩰
Working on some Angular packages...sadly not on github....
View GitHub Profile

NG Bootstrap Tabs Documentation

Overview

NG Bootstrap provides an easy-to-use tab component that allows users to navigate through multiple sections of content. This documentation will guide you through the process of creating tabs using NG Bootstrap and show you how to use sub components as the content of these tabs.

Sample Code

Below is a sample code snippet that demonstrates how to create tabs using NG Bootstrap:

public class JwtService
{
private string _secret;
private int _expDate;
private IConfiguration _config;
public JwtService(IConfiguration config)
{
_secret = config.GetSection("JwtConfig").GetSection("secret").Value;
_config = config;
@bramburn
bramburn / guide to fix.md
Last active November 17, 2019 14:25
Chrome version must be between 70 and 73 - Laravel
@bramburn
bramburn / main.py
Created October 30, 2019 13:28
Example of calling another view from a new view in Django
from django.http import Http404, HttpRequest, QueryDict, HttpResponse
from . import views
import json
# The following code sample shows you how to call another method
# from a view to another. This is pretty useful if you're querying internal APIs.
# I normally have separate views for public and cron type Apis, sometimes you want to call
# an existing view and get the information (or process something) rather than using the requests method in python.
version: 2
jobs:
build:
docker:
- image: circleci/python:2.7-jessie
working_directory: ~/hugo
environment:
HUGO_BUILD_DIR: ~/hugo/public
steps:
@bramburn
bramburn / convertObjectToQueryString
Created February 17, 2019 15:43
This is a simple javascript function to convert an object to a query string
function toQueryString(obj) {
var i;
var arrayKeys = Object.keys(obj);
var returnArray = []
for(i = 0;i < arrayKeys.length;i++)
{
returnArray.push( encodeURIComponent(arrayKeys[i]) + '=' + encodeURIComponent(obj[arrayKeys[i]]));
}
return returnArray.join('&');
@bramburn
bramburn / gist:05857e84d4827ceef4bb
Created February 27, 2016 22:16
Laravel + Carbon difference between two dateTime column
public function DurationOfTimesheet($timesheet_id, $output = null) {
$time = $this->where('id', $timesheet_id)->first();
if (empty($time)) {
return "timesheet not found";
} else {
// dd($time->start);
$start = Carbon::createFromFormat('Y-m-d H:i:s', $time->start);