Skip to content

Instantly share code, notes, and snippets.

View SanthoshBabuMR's full-sized avatar
💫
Give me 6 hours to chop down a tree & I'll spend the first 4 sharpening the axe.

Santhosh Babu SanthoshBabuMR

💫
Give me 6 hours to chop down a tree & I'll spend the first 4 sharpening the axe.
View GitHub Profile
@Zifah
Zifah / databricks_write_to_azure_blob.py
Created February 9, 2019 21:26
Write data directly to an Azure blob storage container from an Azure Databricks notebook
# Configure blob storage account access key globally
spark.conf.set(
"fs.azure.account.key.%s.blob.core.windows.net" % storage_name,
sas_key)
output_container_path = "wasbs://%s@%s.blob.core.windows.net" % (output_container_name, storage_name)
output_blob_folder = "%s/wrangled_data_folder" % output_container_path
# write the dataframe as a single file to blob storage
(dataframe
@avermeulen
avermeulen / 01-setup-new-typescript-project.md
Last active April 20, 2024 08:33
TypeScript basics with Mocha setup - learn how to use interfaces

Setup a new TypeScript project with Mocha support

Ensure you have TypeScript installed globally using this command:

npm install -g typescript

This outlines how to setup a new TypeScript project with mocha support.

@bradtraversy
bradtraversy / ssh.md
Last active May 8, 2024 23:05
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@santisbon
santisbon / Search my gists.md
Last active May 24, 2024 12:55
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@RICH0423
RICH0423 / SwaggerConfig.java
Created September 25, 2017 06:46
Pass JWT token in swagger with Spring Boot and springfox
package com.rich.api.config;
import java.util.Arrays;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
@zergius-eggstream
zergius-eggstream / shift-selectable.js
Created March 13, 2017 10:08
jQuery plugin for shift + click to select multiple checkboxes (https://gist.github.com/AndrewRayCode/3784055 modified for live collections support)
// usage: $('.container').shiftSelectable() to select all checkboxes in container $('.cont')
// or $('.container').shiftSelectable({items: '.shift-selectable'}) to select only checkboxes with shift-selectable class
$.fn.shiftSelectable = function(config) {
config = $.extend({
items: 'input[type="checkbox"]'
}, config);
var $container = this;
var lastChecked;
$container.on('click', config.items, function(evt) {
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@robinraju
robinraju / ValidDate.java
Created June 15, 2016 07:19
Java Annotation for validating Date format in the given string
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
@bahmutov
bahmutov / Docker shell commands.sh
Last active February 9, 2024 07:55
A personal cheat sheet for running local Node project in a Docker container
# See list of docker virtual machines on the local box
$ docker-machine ls
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
# Note the host URL 192.168.99.100 - it will be used later!
# Build an image from current folder under given image name
$ docker build -t gleb/demo-app .
@ningthoujam-lokhendro
ningthoujam-lokhendro / ApacheCommonExample.java
Last active June 11, 2023 15:08
POJO to Map conversion
/**
* Using Apache Common Bean Utils.
*/
import org.apache.commons.beanutils.BeanUtils;
import java.util.HashMap;
public class ApacheCommonExample throws IllegalAccessException,
InvocationTargetException, NoSuchMethodException {
public HashMap<String,Object> convert(Person person) {