Skip to content

Instantly share code, notes, and snippets.

View daemondevin's full-sized avatar

daemon.devin daemondevin

View GitHub Profile
@daemondevin
daemondevin / custom.nsh
Last active July 20, 2024 01:08
Template custom.nsh for use with PortableApps.comLauncher with support for dotNET checking, RegDLL, Services, & Scheduled Tasks. Somewhat commented as well. For help on this file and it's usage visit http://softables.tk/docs
;= VARIABLES
;= ################
;Var $App
;= DEFINES
;= ################
;=# App Specs
!define APP ``
!define APP64 ``
@daemondevin
daemondevin / removeCharAt.snippet.php
Created May 17, 2017 02:46
A snippet and/or template modifier for MODx Rev. Basically it's PHP's answer to Java's removeCharAt() function
<?php
$output = "";
$mod = $modx->getOption('mod',$scriptProperties,1);
if ($mod === 1) {
$str = $input;
$int = $options;
} else {
@daemondevin
daemondevin / getParent.snippet.php
Created May 17, 2017 02:55
A MODx Rev. snippet which returns a resources parent ID
<?php
$get = $modx->getOption('get',$scriptProperties,'id');
$resource = $modx->getObject('modResource', $modx->resource->get('id'));
$parent = $modx->getObject('modResource', $resource->get('parent'));
return $parent? $parent->get($get) : '';
@daemondevin
daemondevin / hashEmail.snippet.php
Created May 17, 2017 03:00
A MODx Rev. snippet which will convert an email address into Unicode values..
<?php
/**
* hashEmail
*
* Copyright 2016 by demon.devin <demon.devin@gmail.com>
* Created on 10-07-2016
*
* hashEmail is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
@daemondevin
daemondevin / image64.snippet.php
Created May 17, 2017 03:19
A MODx snippet which converts a specified image to a base64 encoding for use within a CSS file, style tags, or image tags.
<?php
/**
* image64
*
* Copyright 2017 by demon.devin <demon.devin@gmail.com>
* Created on 1-17-2017
*
* image64 is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
@daemondevin
daemondevin / getDoctype.snippet.php
Created May 17, 2017 03:25
A MODx snippet which allows you the ability to display the DOCTYPE while sending the correct headers with support for content type negotiation.
<?php
/**
* getDoctype snippet for getDoctype extra
*
* Copyright 2016 by demon.devin <demon.devin@gmail.com>
* Created on 10-07-2016
*
* getDoctype is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
@daemondevin
daemondevin / contextmenu.css
Last active March 4, 2024 01:45
A MODx snippet that allows you to replace the default context menu (right click). A demo may be found at: http://codepen.io/demondevin/pen/oYPGxb
/**
* CSS file for middleFinger extra
*
* Copyright 2016 by demon.devin <demon.devin@gmail.com>
* Created on 12-03-2016
*
* @package middlefinger
*/
ul.contextMenu{
list-style:none;
@daemondevin
daemondevin / lastModified.snippet.php
Created May 17, 2017 04:05
A MODx snippet for dealing with browser caching. For example, say you have a stylesheet and you want to make sure everyone has the most recent version.
<?php
/**
* lastModified
*
* Copyright 2016 by demon.devin <demon.devin@gmail.com>
* Created on 10-07-2016
*
* lastModified is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later

404 Error

A typing effect for simulated live coding.. kind of.

By the way, that code isn't meant to actually work.. hence the errors. =)

A Pen by demon.devin on CodePen.

License.