Skip to content

Instantly share code, notes, and snippets.

Henrik Johansson dalslandan200

  • Sweden
Block or report user

Report or block dalslandan200

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dalslandan200 / Profile-Modify.php
Last active Nov 10, 2019
E-Mail Whitelisting working correctly for SMF 2.0.15 (partial file)
View Profile-Modify.php
// Check email providers
if (!empty($modSettings['enable_restrict_EmailProvider']))
// Whitelisted email providers
if (!empty($modSettings['accepted_provider']))
$accepted_provider = explode(",", $modSettings['accepted_provider']);
// Iterate each whitelisted domain, and do housecleaning.
foreach ($accepted_provider as $key => $value)
dalslandan200 / Profile-Modify.php
Last active Nov 10, 2019
E-Mail blacklist and whitelist NOT FINISHED for SMF 2.0.15 (partial file)
View Profile-Modify.php
// Check email providers
if (!empty($modSettings['enable_restrict_EmailProvider']))
// Blacklisted email providers
if (!empty($modSettings['restricted_provider']))
$restricted_provider = explode(",", $modSettings['restricted_provider']);
// Iterate each blacklisted domain, and do housecleaning.
foreach ($restricted_provider as $key => $value)
dalslandan200 / Subs-Post.php
Last active Nov 8, 2019
G-suite with TLS for SMF, using AUTH LOGIN with passed username and password (partial file)
View Subs-Post.php
// Main partion of code, enabling SMF 2.0.15 via SMTP with TLS to work successfully.
// Remember this only works when using username and password via the SMTP services from G-suite.
// This if-clause and partions of the code is found within the function smtp_mail()
if ($modSettings['mail_type'] == 1 && $modSettings['smtp_username'] != '' && $modSettings['smtp_password'] != '')
// Determine the hostname we want to send with each Extended hello and hello.
if (function_exists('gethostname') && gethostname() !== false)
$helo = gethostname(); // Server hostname
elseif (function_exists('php_uname'))
$helo = php_uname('n'); // Server hostname
dalslandan200 / gist:9167c848d37ea2bfa91af08b2f552bff
Created Jul 16, 2019
Compiling Joulecoin with self compiled openSSL
View gist:9167c848d37ea2bfa91af08b2f552bff
#1 Be in the directory you want (preferably in /root or ~) or create a new directory to not mix maybe old Joulecoin builds?
#2 Preferably be root user, if not use SUDO to ensure correctness.
#3 Do not continue to next step if you have some error, which potentially indicate the instruction from before didn't finish correctly!
#4 intall openSSL (shared library) and in different directory
tar -xvzf openssl-1.0.2s.tar.gz
CFLAGS=-fPIC ./config --prefix=/openssl-1.0.2s --openssldir=/openssl-1.0.2s shared
make install
dalslandan200 / gist:b6c9efc2aad2c73c980fa1cb51c69612
Created Sep 21, 2018 — forked from genecyber/gist:46a835038221d8e30cfb
Bitpay insight altcoin p2p alt hashing hotfix
View gist:b6c9efc2aad2c73c980fa1cb51c69612
var blockHash = bitcoreUtil.formatHashFull(block.calcHash());
var check = blockHash.substring(0, 4);
if (check != '0000') {
console.log("Scrypt block detected. Falling back to RPC");
self.historicSync.start({forceRPC:1}, function(){
self.log('[p2p_sync] Done resync.');
dalslandan200 / chainparams.cpp
Created Sep 11, 2018
Update checkpoints Joulecoin (NOT FULL FILE!)
View chainparams.cpp
static Checkpoints::MapCheckpoints mapCheckpoints =
( 0, uint256("0x0000077e5cce889f0920029bf89e8ecb16f7be38e1019c3e21c26d4687ce11f5"))
( 21998, uint256("0x000000000029b7b1ea497dd917ba5bb78b8453759acc145918c6446205fd7e49"))
( 34124, uint256("0x000000000019c6d8dbd8f693077b5b09dc0df722f4b548ca6cbc9e712aa94935"))
( 68073, uint256("0x00000000000ed8b4432909814f2f0a6a699625833d0e4b88fe69a5807f116ae0"))
( 90016, uint256("0x0000000000156c5c7e98211d60c1bd644ca6cfb0b8ef8b484adc663708d64e5b"))
( 189383, uint256("0x0000000000013e11c889a3d1ebb0d1833227ffa7fb6d06f7ce42e8d8e1fb7dce"))
( 245624, uint256("0x00000000000142ce3a43b4304ab6f886c6fd9a806d83a72c344b24a7d24da7fc"))
( 328190, uint256("0x000000000000f2f362d4f78cad2fa5c03452b90213a29b6be9c94827ce73e1b3"))
You can’t perform that action at this time.