Skip to content

Instantly share code, notes, and snippets.

@ECHO off
REM Trap for doing `pause` only when double-click from explorer
IF "%parent%"=="" SET parent=%~0
IF "%console_mode%"=="" (
SET console_mode=1
FOR %%x IN (%cmdcmdline%) DO (
IF /i "%%~x"=="/c" SET console_mode=0
)
)
@innocenat
innocenat / datacontainer.py
Created January 25, 2020 19:30
Just some helper tools I created to help me save all research data, ever.
import json
import os
import re
import time
from os import path
from typing import TextIO, List, Dict, Callable, AnyStr, Any, Tuple, Pattern, Optional
import matplotlib.pyplot as plt
import numpy as np
@innocenat
innocenat / importer.php
Last active December 7, 2019 18:00
Google Docs to WordPress
<?php
/* Load up wordpress externally */
define('WP_USE_THEMES', false);
define('COOKIE_DOMAIN', false);
define('DISABLE_WP_CRON', true);
require('../wordpress/wp-load.php');
require('../wordpress/wp-admin/includes/image.php');
$user_id = -1;