Skip to content

Instantly share code, notes, and snippets.

Inviter Meowth 2.0: https://discordapp.com/oauth2/authorize?client_id=346759953006198784&scope=bot&permissions=268822608

Skriv !configure på en av kanalene som boten er. Den vil da sende DM til deg med instruksjoner. Det første du må gjøre er å flytten rollen til Meowth litt oppover.

Under har jeg skrevet hva boten spør om, og så hve jeg mener som er et fornuftig svar.

Role Setup
Before you begin the configuration, please make sure my role is moved to the top end of the server role hierarchy. It can be under admins and mods, but must be above team ands general roles. Here is an example: http://i.imgur.com/c5eaX1u.png
@xqus
xqus / diceware_nb-NO.txt
Last active March 19, 2017 01:14
Norwegian diceware dictionary
1000 abonnement
1001 absolutt
1002 adferd
1003 adgang
1004 administrator
1005 adresse
1006 adskillig
1010 advarsel
1011 ære
1012 afrika

Keybase proof

I hereby claim:

  • I am xqus on github.
  • I am audun (https://keybase.io/audun) on keybase.
  • I have a public key ASCuqdTThZHNSdmwVO-pOhT86W4964wAsbhfzIjL9OkMBwo

To claim this, I am signing this object:

<?php
require '../vendor/autoload.php';
require '../TwigView.php';
$app = new \Slim\Slim(
array('view' => 'TwigView')
);
/**
* Configuration options.
@xqus
xqus / bitmessage-address-lookup.md
Created January 26, 2013 21:38
Bitmessage address lookup proposal

Bitmessage address lookup proposal

Bitmessage addresses are difficult, or impossible to remember. This note proposes an address lookup system, based on the DNS infrastructure.

An Bitmessage address could be defined like this:

bm://example.com
@xqus
xqus / gist:4580825
Last active December 11, 2015 09:38
<?php
$opts = array(
'http' => array(
'method' => "GET",
)
);
$context = stream_context_create($opts);
$fp = fopen("http://www.example.com/", "rb", false, $context);
@xqus
xqus / example.php
Created December 19, 2012 14:25
Signing of hash using ECDSA in PHP
<?php
// configure the ECC lib
if (!defined('USE_EXT')) {
if (extension_loaded('gmp')) {
define('USE_EXT', 'GMP');
} else if(extension_loaded('bcmath')) {
define('USE_EXT', 'BCMATH');
} else {
die('GMP or bcmath required. (GMP is faster).');
}
@xqus
xqus / bcrypt.php
Created December 30, 2011 02:57 — forked from dzuelke/bcrypt.php
How to use bcrypt in PHP to safely store passwords (PHP 5.3+ only)
<?php
// secure hashing of passwords using bcrypt, needs PHP 5.3+
// see http://codahale.com/how-to-safely-store-a-password/
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt
// just an example; please use something more secure/random than sha1(microtime) :)
$salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22);
// 2a is the bcrypt algorithm selector, see http://php.net/crypt
@xqus
xqus / gist:1503797
Created December 20, 2011 23:27
PDO field escaping
<?php
$sth = $dbh->prepare(
'DESCRIBE `'.str_replace(array('\\',"\0" ,'`'), '', $table).'`'
);
ALTER TABLE table MODIFY column INT(11) UNSIGNED AFTER some_column;