Requires a working mermaid setup for just-the-docs.
Place the file below in the _plugins
folder of your site. Now in your AsciiDoc files, you can do
[mermaid]
....
graph TD;
A-->B;
A-->C;
import win32api, win32con | |
import os, os.path | |
import struct | |
import math | |
def checkPath(path, mode): | |
if not os.path.exists(path) or not os.path.isfile(path): | |
raise ValueError("{0} does not exist or isn't a file.".format(path)) | |
if not os.access(path, mode): | |
raise ValueError("Insufficient permissions: {0}".format(path)) |
with Ada.Text_IO; use Ada.Text_IO; | |
with Ada.Containers.Hashed_Maps; use Ada.Containers; | |
with Ada.Iterator_Interfaces; | |
procedure Main is | |
package Tiles is | |
-- Implementation is completely hidden | |
type Tile_Type is private; | |
Requires a working mermaid setup for just-the-docs.
Place the file below in the _plugins
folder of your site. Now in your AsciiDoc files, you can do
[mermaid]
....
graph TD;
A-->B;
A-->C;
#!/usr/bin/expect -f | |
# | |
# creates a new key/cert pair with openssl and signs it with a local CA | |
# | |
# expects /etc/ssl/openssl.cnf to provide correct defaults to everything | |
# except the CN. Easily modifyable to handle more parameters. | |
# | |
# usage: ./newcert.key CN capass | |
# | |
# * CN: the name of your website, eg example.com |
$debDir = "/some/path" | |
define localPackage ($packageName = $title) { | |
package {$packageName : | |
ensure => installed, | |
provider => dpkg, | |
source => "${debDir}/${packageName}.deb" | |
} | |
} |
passdb passwd-file { | |
args = /home/vmail/%d/passwd | |
} | |
passdb pam { | |
args = session=yes dovecot | |
} | |
userdb static { | |
args = uid=vmail gid=dovecot home=/home/vmail/%d/%u |
with Ada.Containers.Vectors; | |
with Ada.Containers.Hashed_Maps; | |
generic | |
type Key_Type is private; | |
with package Element_Vectors is new Ada.Containers.Vectors (<>); | |
with function Hash (Key : Key_Type) return Ada.Containers.Hash_Type; | |
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean; | |
package Multimaps is | |
package Parent is new Ada.Containers.Hashed_Maps |
-- compilation unit 1: | |
generic | |
type T is private; | |
package Unit is | |
-- ... | |
end Unit; | |
-- compilation unit 2: |
#include <iostream> | |
using namespace std; | |
struct A { | |
void put() { | |
cout << "A" << endl; | |
} | |
virtual void vPut() { | |
cout << "A" << endl; |
def rec_permutations(prefix, remaining): | |
if len(remaining) == 1: | |
yield prefix + remaining | |
else: | |
for e in remaining: | |
new_remaining = remaining[:] # copy | |
new_remaining.remove(e) | |
for p in rec_permutations(prefix + [e], new_remaining): | |
yield p | |