Skip to content

Instantly share code, notes, and snippets.

View darkcolonist's full-sized avatar
🐣
I rise from the fire, stronger and brighter.

Christian Noel Reyes darkcolonist

🐣
I rise from the fire, stronger and brighter.
View GitHub Profile
@darkcolonist
darkcolonist / sparkpost-mailer-example.php
Last active April 2, 2020 07:00
sparkpost email template (using Swiftmailer 6.2.1)
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
require_once('./vendor/autoload.php');
$sparkpost_key = 'your+key+here'; // your password go here
$recipient = 'the-tester@example.com'; // enter your email here to receive the email
$sender = 'mailer@example.net'; // enter your registered domain here at sparkpost
$transport = (new Swift_SmtpTransport('smtp.sparkpostmail.com', 2525))
@darkcolonist
darkcolonist / send_to_mp4.bat
Last active June 25, 2019 02:43
send_to_mp4.bat
@ECHO OFF
rem For installation, just copy batch file to SendTo folder..
SET _new_extention=mp4
:start
if "%~1"=="" (call goto :the_end)
CALL :SUB_CONVERT %1
SHIFT
goto :start
since you've forced me to upgrade from 7.4x and from 7.3x i've been having a lot of issues with your latest, crappy version of skype: 8.xx.
creating conversations / group chats
so, whenever i create new group chats, everyone in the gc are administrators. like everyone can do anything they want to do with the gc unlike before where the admin is the only one capable of doing those right? well IT SUCKS.
conversation lists
the old version 7.xx of skype, the developers at that time already did a very good job of disabling notifications for lesser important conversations. the conversations are greyed out, there's a subtle message counter in orange circle. the conversations in the left-hand side are sorted the way i want them to be sorted. newer messages that arrive in muted conversations don't move up/down the conversation list in an animated fashion... JUST THE WAY I WANT IT... the new version of skype? well, it violated all of those --- the conversation gets re-ordered with an animation that is typically us
@darkcolonist
darkcolonist / mailtest.php
Created March 15, 2019 03:14
sendmail template for Swift-5.4.0
<?php
header("Content-type: text/plain");
require_once('vendor/autoload.php');
$config = array(
// "host" => "siteurl.com",
"host" => "localhost",
"sender" => "noreply@siteurl.com", // CHANGE ME
"sender_name" => "My New Site to send Messages!",
"password" => "CHANGEMEPLS", // CHANGE ME
@darkcolonist
darkcolonist / promise.js
Last active February 20, 2019 02:50
nodejs promise instead of async/await - sequential processes (using node v6.2.2)
console.log("hello world");
var trace = [];
function getListOfUsers(){
// setTimeout(() => {
// return trace.push('the list of users');
// },1000);
return trace.push('the list of users');
}
@darkcolonist
darkcolonist / index.php
Created January 23, 2019 06:50
google recaptcha implementation - simple
<?php
if(isset($_POST["firstname"])){
echo "<pre>";
echo print_r($_POST, true);
echo "</pre>";
require("recaptchalib.php");
/**
* user your own private key here!!!
* @var string
@darkcolonist
darkcolonist / WildcardHelperFunction.php
Created January 16, 2019 06:22
wildcard routing to controller in Laravel 5.7
<?php
// taken from: https://laravel-tricks.com/tricks/wildcard-routing-setup as of January 16, 2019 11:12 AM
// This trick has been superseded by Laravel Sketchpad
// https://github.com/davestewart/laravel-sketchpad
// tested working for Laravel 5.7
/**
* Wildcard routing function
*
* @param \Illuminate\Routing\Router $routeObject as the router instance
@darkcolonist
darkcolonist / win7-8-10-send-to-mp4.bat
Last active January 7, 2019 09:20
send to mp4 (convert to mp4) using ffmpeg (src: https://superuser.com/a/440639). tested with mkv to mp4 and avi to mp4 conversions
@ECHO OFF
rem ***********************************************************************
rem * MOV to MPG batch converter. (2014-09-29 Sinx) *
rem * *
rem * For installation just copy batch file to SendTo directory. *
rem * On Win8 execute "SHELL:sendto" to go to Sendto folder. *
rem * *
rem * I got quite good compression rations with these parameters: *
rem * vcodec=h264 codec used *
rem * vb=10000 video bandwidth *
Today, I found how to fix my Cloud II horrible boosted treble and very little bass problem.
1. Download and install Equalizer APO from
https://sourceforge.net/p/equalizerapo/
2. During installation, select HyperX Cloud II from the playback devices available and hit OK.
3. Open Equalizer APO Configuration Editor from the start menu.
4. Inside 'config.txt' window, delete the three default presets. (click the red minuses)
@darkcolonist
darkcolonist / dump.sql
Last active April 27, 2018 03:33
le group_concat
DROP TABLE IF EXISTS `buses`;
CREATE TABLE `buses` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`schedule_id` int(10) unsigned DEFAULT NULL,
`route` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=81;
LOCK TABLES `buses` WRITE;