This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.
$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"copyOnSelect": false, | |
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
// Add custom keybindings to this array. | |
// To unbind a key combination from your defaults.json, set the command to "unbound". | |
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings | |
"keybindings": | |
[ | |
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. |
// depends on BenchmarkDotNet 0.10.10 | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Attributes.Jobs; | |
using BenchmarkDotNet.Running; |
/* | |
(from Troy Hunt's article https://www.troyhunt.com/understanding-csp-the-video-tutorial-edition/) | |
1. Go to Google Chrome | |
2. Go to any website (works cool on facebook) | |
3. Right click anywhere -> Inspect Element | |
4. Click on the rightmost "Console" tab. | |
5. Copy paste the following * into the console. | |
6. Make sure the volume isn't too loud! | |
6. Press Enter. |
public class Person | |
{ | |
public Person(string name, int age) | |
{ | |
this.Name = name; | |
this.Age = age; | |
} | |
public string Name { get; private set; } | |
public int Age { get; private set; } |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Either copy the aliases from the .gitconfig
or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4
- creates local branch pr/4
from the github upstream
(if it exists) or origin
remote and checks it outgit pr 4 someremote
- creates local branch pr/4
from someremote
remote and checks it out#/* matchere: search for regexp at beginning of text */ | |
#int matchhere(char *regexp, char *text) { | |
# if (regexp[0] == '\0') | |
# return 1; | |
# if (regexp[1] == '*') | |
# return matchstar(regexp[0], regexp+2, text); | |
# if (regexp[0] == '$' && regexp[1] == '\0') | |
# return *text == '\0'; | |
# if (*text!='\0' && (regexp[0]=='.' || regexp[0]==*text)) | |
# return matchhere(regexp+1, text+1); |