Skip to content

Instantly share code, notes, and snippets.

Palm oil. know the facts!


Palm oil. know the facts!
View GitHub Profile
DrGo /
Created Nov 19, 2022 — forked from ctsrc/
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
DrGo / book-layout-css-grid-flexbox-wip.markdown
Created Sep 13, 2022
Book Layout // CSS Grid // Flexbox // WIP
View book-layout-css-grid-flexbox-wip.markdown
View gist:7256f19221472d90ecba44f2c4a0dd7e

Vim for Go development



  • if : select the code inside a function
  • af : select the entire function code including comments


  • gd : go to definition of word under cursor
  • Ctrl-O / Ctrl-I :hop back to your source file/return to definition
  • K : opens documentationn
DrGo / TerminalVim.scpt
Last active Sep 9, 2019 — forked from chaadow/TerminalVim.scpt
open a file in vim within an iTerm2 tab
View TerminalVim.scpt
-- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm
-- To use this script:
-- 1. Open Automator and create a new Application
-- 2. Add the "Run Applescript" action
-- 3. Paste this script into the Run Applescript section
-- 4. Save the application as in your Applications folder
-- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default
on run {input, parameters}
DrGo / stata-clearlinux.txt
Last active Aug 11, 2019
installing Stata on clear linux
View stata-clearlinux.txt
Error on running xstata-mp re missing
sudo ln -s /usr/lib64/ /usr/lib64/
DrGo /
Created Mar 17, 2018
Signalling intentions in Stata using fake keywords

In Stata, it is possible to create pseudo-keywords to document your intentions. For instance, Stata does not have a way to declare a macro (Stata memory-based variable) as a constant. In many programming languages, there is a keyword, typically const, that signals to the compiler/interpreter, and more importantly to human readers, that this variable should not be changed after its declaration. E.g.,

    const PI = 3.14   //PI is guaranteed not to change during the execution of the program, avoiding subtle bugs

There is no equivalent keyword in Stata, but it can be simulated using this approach:

// In your, declare a global macro "const" and assign an empty string to it
DrGo /
Last active Mar 17, 2018
Bringing up the variable manager window while using Stata command line

If you are like me, when you are using Stata's command window you do not like to switch to using the mouse to bring up the variable manager window whenever, e.g., you want to check the name of a variable.

One solution is assigning the following commands to a certain function key (e.g., F2) and running it every time you load Stata by adding it to your file.

global F2 : display "varm" _char(13) "sleep 1000" _char(13) "window manage forward command;"

Everytime you press F2, the variable manager window will be displayed for 1 second.

How it works

DrGo /
Created Jun 24, 2017 — forked from ushkinaz/
Tests speed of http mirrors of cygwin
#!/usr/bin/env python3
Tests http mirrors of cygwin
import random
import time
from urllib.request import urlopen
import sys
__author__ = 'Dmitry Sidorenko'
DrGo / BetterBibLatexCiteKeyForMarkdown.js
Created Jun 18, 2017 — forked from EoinTravers/BetterBibLatexCiteKeyForMarkdown.js
A modification of BibTexCiteKeyForMarkdown, exporting citations in BetterBibLatex format (i.e. "@TRAVERS2015")
View BetterBibLatexCiteKeyForMarkdown.js
"translatorID": "",
"translatorType": 3,
"label": "Better BibLateX key for Markdown",
"creator": "Eoin Travers. Forked from BibTex key for Markdown, created by liob based on the works of Peter O'Brien, Simon Kornblith and Richard Karnesky",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": null,
"priority": 200,
"inRepository": true,
View app-engine-google-cloud-storage-upload-example.go
package example
import (