Skip to content

Instantly share code, notes, and snippets.

@lexeek
lexeek / ReadWriteExcelFile.java
Created April 27, 2024 00:09 — forked from madan712/ReadWriteExcelFile.java
Read / Write Excel file (.xls or .xlsx) using Apache POI
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@lexeek
lexeek / index.html
Created June 1, 2022 22:22 — forked from archetana/index.html
Pan and Zoom in jsPlumb Community Edition with Dagre and jQueryUI Draggable
<div class="container">
<div class="panzoom">
<div class="diagram">
<div id="i0" class="item">Root!</div>
<div id="i1" class="item">Child 1</div>
<div id="i11" class="item">Child 1.1</div>
<div id="i12" class="item">Child 1.2</div>
<div id="i2" class="item">Child 2</div>
<div id="i21" class="item">Child 2.1</div>
<div id="i3" class="item">Child 3</div>
@lexeek
lexeek / caret.js
Created January 21, 2021 10:05 — forked from nothingismagick/caret.js
Small script to detect caret pixel position in contenteditable div
/**
* Get the caret position in all cases
*
* @returns {object} left, top distance in pixels
*/
getCaretTopPoint () {
const sel = document.getSelection()
const r = sel.getRangeAt(0)
let rect
let r2
@lexeek
lexeek / _spacing-helpers.scss
Created September 22, 2020 21:44 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@lexeek
lexeek / dom.service.ts
Created June 23, 2020 18:02 — forked from caroso1222/dom.service.ts
Service to dynamically append Angular components to the body
import {
Injectable,
Injector,
ComponentFactoryResolver,
EmbeddedViewRef,
ApplicationRef
} from '@angular/core';
@Injectable()
export class DomService {
@lexeek
lexeek / http-benchmark.md
Created May 29, 2020 13:04 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@lexeek
lexeek / restart coreaudio daemon
Created January 22, 2020 14:11 — forked from felipecsl/restart coreaudio daemon
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
@lexeek
lexeek / media-query.css
Created July 9, 2019 16:41 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@lexeek
lexeek / index.html
Created February 7, 2019 16:42 — forked from mike-douglas/index.html
Most simple d3.js stack bar chart from matrix
<!DOCTYPE html>
<html>
<head>
<title>Simple Stack</title>
<script src="http://d3js.org/d3.v2.js"></script>
<style>
svg {
border: solid 1px #ccc;
font: 10px sans-serif;
shape-rendering: crispEdges;
@lexeek
lexeek / jssip.md
Created November 12, 2018 17:38 — forked from dtolb/jssip.md
JsSip Demo

#JSSIP with Catapult API ​ ##Prerequisites ​

  • Register for a Catapult (Bandwidth Application Platform) account here
  • Register a SIP domain
  • Create an endpoint/user
  • If you want to make calls to the PSTN (normal phones) you will need a server to handler events from Catapult
  • Make phone calls ​