Skip to content

Instantly share code, notes, and snippets.

View vonwenm's full-sized avatar

Marcelle von Wendland vonwenm

View GitHub Profile
@vonwenm
vonwenm / BOOTSTRAP.BAS for GistLoad
Created August 5, 2017 18:55
VBA GIST Loader Bootstrap Code
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load
' bootstrap code to update VBA modules from gists
' all code is in this module - so no classes etc.
' latebinding is used to avoid need for any references
' can be found at https://gist.github.com/3403537
Option Explicit
' v2.04 - 3403537
' if you are using your own gists - change this
@vonwenm
vonwenm / gistThat_.vba
Created August 5, 2017 18:54 — forked from brucemcpherson/gistThat_.vba
Bootstrap for gistThat_ code distributor for VBA
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load
' bootstrap code to update VBA modules from gists
' all code is in this module - so no classes etc.
' latebinding is used to avoid need for any references
' can be found at https://gist.github.com/3403537
Option Explicit
' v2.04 - 3403537
' if you are using your own gists - change this
Const gistOwner = "brucemcpherson"
@vonwenm
vonwenm / 0_reuse_code.js
Created August 5, 2017 18:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vonwenm
vonwenm / cplace manifest
Last active August 5, 2017 17:53 — forked from brucemcpherson/cplace manifest
cplace manifest
<?xml version="1.0"?>
<gistThat info="this is a manifest for gistThat VBA code distribution - see ramblings.mcpher.com for details">
<manifest description="cPlace example demo" contact="[email protected]">
<gists>
<item1 gistid="7b0bbfd0c2b90431ef52327967525484" version="" filename="testMVW.vba" module="testMVW" type="module"/>
<item2 gistid="7b0bbfd0c2b90431ef52327967525484" version="" filename="cMVW.cls" module="cMVW" type="class"/>
<item3 guid="{000204EF-0000-0000-C000-000000000046}" name="VBA" major="4" minor="0" description="Visual Basic For Applications" type="reference"/>
<item4 guid="{00020813-0000-0000-C000-000000000046}" name="Excel" major="1" minor="6" description="Microsoft Excel 12.0 Object Library" type="reference"/>
<item5 guid="{00020430-0000-0000-C000-000000000046}" name="stdole" major="2" minor="0" description="OLE Automation" type="reference"/>
<item6 guid="{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}" name="Office" major="2" minor="4" description="Microso
@vonwenm
vonwenm / cMVW.cls
Last active August 5, 2017 18:35
Example 01 VBA Code
Option Explicit
Private pPlace As String
Private pLat As Double
Private pLon As Double
Public Function init(sPlace As String, dLat As Double, dLon As Double) As cMVW
pPlace = sPlace
pLat = dLat
pLon = dLon
Set init = Me
End Function
@vonwenm
vonwenm / nginx.conf
Created June 1, 2017 16:50 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@vonwenm
vonwenm / nginx-websocket-proxy.conf
Created June 1, 2017 16:24 — forked from uorat/nginx-websocket-proxy.conf
Nginx Reverse Proxy for WebSocket
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;
@vonwenm
vonwenm / USAmap.tex
Created March 8, 2016 21:37 — forked from bordaigorl/USAmap.tex
USA TikZ map
%% Imported from https://upload.wikimedia.org/wikipedia/commons/3/32/Blank_US_Map.svg
%% Translated to TikZ using Inkscape 0.48
\tikzset{USA map/.cd,
state/.style={fill, draw=white, ultra thick},
HI/.style={}, AK/.style={}, FL/.style={}, NH/.style={}, MI/.style={}, MI/.style={}, SP/.style={}, VT/.style={}, ME/.style={}, RI/.style={}, NY/.style={}, PA/.style={}, NJ/.style={}, DE/.style={}, MD/.style={}, VA/.style={}, WV/.style={}, OH/.style={}, IN/.style={}, IL/.style={}, CT/.style={}, WI/.style={}, NC/.style={}, DC/.style={}, MA/.style={}, TN/.style={}, AR/.style={}, MO/.style={}, GA/.style={}, SC/.style={}, KY/.style={}, AL/.style={}, LA/.style={}, MS/.style={}, IA/.style={}, MN/.style={}, OK/.style={}, TX/.style={}, NM/.style={}, KS/.style={}, NE/.style={}, SD/.style={}, ND/.style={}, WY/.style={}, MT/.style={}, CO/.style={}, ID/.style={}, UT/.style={}, AZ/.style={}, NV/.style={}, OR/.style={}, WA/.style={}, CA/.style={}}
\tikzset{
every state/.style={USA map/state/.style={#1}},
HI/.style={USA map/HI/.sty
@vonwenm
vonwenm / RoslynDynamicCompilation.cs
Created March 2, 2016 15:55 — forked from joeriks/RoslynDynamicCompilation.cs
Add a piece of dynamically compiled code in memory with the help of Roslyn. (After this the Greeter class will be available and can be run from example from the immediate window in visual studio).
public static void AddGreeter()
{
AddInmemory("Greeter", @"using System;
class Greeter
{
public string Greet()
{
return ""Hello World"";
}
@vonwenm
vonwenm / README.markdown
Created January 25, 2016 19:19 — forked from alloy/README.markdown
Learn the LLVM C++ API by example.

The easiest way to start using the LLVM C++ API by example is to have LLVM generate the API usage for a given code sample. In this example it will emit the code required to rebuild the test.c sample by using LLVM:

$ clang -c -emit-llvm test.c -o test.ll
$ llc -march=cpp test.ll -o test.cpp