Skip to content

Instantly share code, notes, and snippets.

View j2doll's full-sized avatar
💭
1️⃣ 😄 2️⃣ 😭

Jay Two j2doll

💭
1️⃣ 😄 2️⃣ 😭
View GitHub Profile
@j2doll
j2doll / excelapp.py
Created March 30, 2023 06:48 — forked from msuryaprakash/excelapp.py
Interacting with Microsoft Excel from Python using the Win32 COM API (Example Python Code)
"""
An example of using PyWin32 and the win32com library to interact
Microsoft Excel from Python.
This can be used instead of Visual Basic for Applications (VBA)
(c) Michael Papasimeon
"""
import win32com.client
@j2doll
j2doll / .licrc
Created March 16, 2023 05:41 — forked from robertohuertasm/.licrc
Simple .licrc config file for Licensebat
# IMPORTANT!: ALL SECTIONS ARE MANDATORY
[licenses]
# This indicates which are the only licenses that Licensebat will accept.
# The rest will be flagged as not allowed.
accepted = ["MIT", "MSC", "BSD"]
# This will indicate which licenses are not accepted.
# The rest will be accepted, except for the unknown licenses or dependencies without licenses.
# unaccepted = ["LGPL"]
# Note that only one of the previous options can be enabled at once.
# If both of them are informed, only accepted will be considered.
@j2doll
j2doll / get_gists.py
Created December 29, 2020 16:36 — forked from leoloobeek/get_gists.py
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@j2doll
j2doll / README.md
Created January 9, 2019 08:35 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@j2doll
j2doll / currentStackAndLine.js
Created August 24, 2018 01:59 — forked from kerryChen95/currentStackAndLine.js
Get current stack and line number in JavaScript
// For V8:
// Define global variable `__stack__` and `__line`
// for current stack and line
(function(global){
Object.defineProperty(global, '__stack__', {
get: function(){
var orig = Error.prepareStackTrace;
Error.prepareStackTrace = function(_, stack){ return stack; };
var err = new Error;
Error.captureStackTrace(err, arguments.callee);
@j2doll
j2doll / svn_to_git.rst
Last active September 3, 2018 00:07 — forked from epicserve/svn_to_git.rst
Convert SVN Repositories to Git Repositories
@j2doll
j2doll / html2md-with-pandoc.sh
Created June 25, 2018 13:07 — forked from bzerangue/html2md-with-pandoc.sh
RECURSIVELY Bash convert all your html to markdown files (with Pandoc)
find . -name "*.ht*" | while read i; do pandoc -f html -t markdown "$i" -o "${i%.*}.md"; done
@j2doll
j2doll / batch_pandoc_win.bat
Created June 25, 2018 13:06 — forked from mmparker/batch_pandoc_win.bat
Batch conversion of .markdown to .html on Windows command line
REM This file converts all of the Markdown files to HTML.
REM Converting in the current directory
REM %%~ni returns just the filename of %%i, not its extension
for %%i in (*.markdown) do pandoc -f markdown -t html5 %%~ni.markdown > html/%%~ni.html
REM Converting a subdirectory - just slap it on front
for %%i in (report_pages/*.markdown) do pandoc -f markdown -t html5 report_pages/%%~ni.markdown > html/report_pages/%%~ni.html
@j2doll
j2doll / process.sh
Created June 25, 2018 13:06 — forked from d6y/process.sh
Batch convert HTML to Markdown
#!/bin/bash
# Converts HTML from https://exportmyposts.jazzychad.net/ exports to Markdown
POSTS_DIR=/Users/richard/Desktop/d6y/posts
for file in $POSTS_DIR/*.html
do
echo $file
@j2doll
j2doll / ReadWriteExcelFile.java
Created June 23, 2018 11:31 — 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;