This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Generate a random string in [a-z0-9] | |
| * | |
| * @param Length | |
| * @return random alphanumeric string | |
| */ | |
| public static function make_secret($Length = 32) { | |
| $Str = ''; | |
| while (strlen($Str) < $Length) { | |
| $Hex = bin2hex(mcrypt_create_iv(10, MCRYPT_DEV_URANDOM)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \tikzstyle{blok}=[draw, fill=blue!20, minimum height=10em, minimum width=11em] | |
| \begin{tikzpicture}[node distance=2.5cm, auto] | |
| \node[blok] (client) [minimum height=35em] {client}; | |
| \path (client.east)+(7cm, 4.5cm) node (owner) [blok] {Resource owner} ; | |
| \path (client.east)+(7cm, 0cm) node (auth) [blok] {Authentication server}; | |
| \path (client.east)+(7cm, -4.5cm) node (server) [blok] {Resource Server}; | |
| \path[draw, <-, transform canvas={shift={(0, 1cm)}}] (owner) -- node [above] {Authorization Request} (client.east |- owner) ; | |
| \path[draw, ->, transform canvas={shift={(0, -1cm)}}] (owner) -- node [above] {Authorization Grant} (client.east |- owner) ; | |
| \path[draw, <-, transform canvas={shift={(0, 1cm)}}] (auth) -- node [above] {Authorization Grant} (client.east |- auth) ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Dijkstra's algorithm | |
| """ | |
| from collections import defaultdict | |
| class Graph: | |
| nodes = set() | |
| edges = defaultdict(list) | |
| distances = dict() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| for h in $(host tracker.what.cd | cut -d' ' -f 4); | |
| do | |
| echo -n "$h\t" | |
| curl http://$h:34000/announce | |
| echo | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| V="--progress -hh " | |
| echo "======backing up started======" | |
| date | |
| echo | |
| echo "Backing up /var/music/" | |
| date | |
| rm -rf /media/backup/snapshots/music.5 | |
| mv /media/backup/snapshots/music.4 /media/backup/snapshots/music.5 | |
| mv /media/backup/snapshots/music.3 /media/backup/snapshots/music.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The system will look for this config file to be specified as a system | |
| # property: | |
| # -Djava.util.logging.config.file=${project_loc:googleplus-simple-cmdline-sample}/logging.properties | |
| # Set up the console handler (uncomment "level" to show more fine-grained messages) | |
| handlers = java.util.logging.ConsoleHandler | |
| java.util.logging.ConsoleHandler.level = ALL | |
| # Set up logging of HTTP requests and responses (uncomment "level" to show) | |
| com.google.api.client.http.level = INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 4d8546235a4c79650f1a62edeaa1f2000017a45b | |
| Author: Thom Wiggers <thom@thomwiggers.nl> | |
| Date: Wed Aug 19 22:48:33 2015 +0200 | |
| HERP DERP DERP | |
| diff --git a/web/application/single_pages/adminstratietrucjes.php b/web/application/single_pages/adminstratietrucjes.php | |
| index e8b62e3..f8cc931 100644 | |
| --- a/web/application/single_pages/adminstratietrucjes.php | |
| +++ b/web/application/single_pages/adminstratietrucjes.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Javascript Image Editor | |
| * | |
| * Allows to resize images inside the browser. | |
| * | |
| * Supports IE10+ with native support | |
| * | |
| * @author Thom Wiggers | |
| * @copyright InQbator B.V. 2013-2014 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----BEGIN PGP SIGNED MESSAGE----- | |
| Hash: SHA512 | |
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCf039KYsoqZNz+P4HEpHMHrMY6MhvoG6r/9MgD8JB4be0y/G1mE4QxVLGoxRSmcbZv4zOm+EdwUtHNBiJV4rATgb4jFvRkpHDUK/wo0+T4teGRpQRKq5lzpcwTMOD9PSwHKS+UVXfaNv+CI1lVjoEsPriwl64RXHQP0sWNnYhiOgaMmQudYrjLmWjv83MjZ/iOL9LxY8frriL4Mv0pzh0Ih4k4C8kx3Ge2YHhNzjgeqbVuhv4WyxM2Ut75/ILfApFrXaXieJLH7ymzm4dvWhLHjejUU5/q0NdfjnlH94OirXkVGjPjZvK1PasM89orMcLDsg8fjDBFo2YtYvKtZNTD | |
| -----BEGIN PGP SIGNATURE----- | |
| iF4EAREKAAYFAlT16hYACgkQQXX1nPPrRfw2SgD/aq1jk4gxVIGIGPmjH/dm0WKB | |
| aQeFSha4c+cKUuM3L6EA/0qo1Nvdeu9Z3tnh21fX6rrPB0bE00A/mBnctmTzjK92 | |
| =gAin | |
| -----END PGP SIGNATURE----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals | |
| from django.db import migrations | |
| def insert_sites(apps, schema_editor): | |
| """Populate the sites model""" | |
| Site = apps.get_model('sites', 'Site') | |
| Site.objects.all().delete() |