Skip to content

Instantly share code, notes, and snippets.

@DougBeney
DougBeney / Very Simple Snap Scrolling CSS Example.html
Created Jun 17, 2020
Very Simple Snap Scrolling CSS Example
View Very Simple Snap Scrolling CSS Example.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Snap Scrolling</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style>
html, body { margin: 0; }
View log
ERROR: ld.so: object '/home/doug/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/doug/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/doug/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/doug/.steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
2014.650:0008:0009:trace:module:load_builtin_callback loaded ntdll.dll 0x10380 0x7bc20000
2014.650:0008:0009:trace:module:load_builtin_dll Trying built-in L"kernel32.dll"
2014.650:0008:0009:trace:module:load_dll looking for L"ntdll.dll" in L""
2014.650:0008:0009:trace:module:load_dll Found L"C:\\windows\\system32\\ntdll.dll" for L"ntdll.dll" at 0x7bc20000, count=2
2014.650:0008:0009:trace:module:load_builtin_call
View steam-info.txt
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
CPU Family: 0x6
@DougBeney
DougBeney / Vagrantfile
Last active May 23, 2018
Minimal Vagrantfile for a basic Nginx static site
View Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network "forwarded_port", guest: 80, host: 8000
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get upgrade -y
apt-get install -y nginx
systemctl start nginx
ln -sf /vagrant /var/www/site
@DougBeney
DougBeney / keyboard.py
Last active Nov 15, 2017
Python Script to switch CMD and CTRL on command.
View keyboard.py
#! /usr/bin/python
import sys
import os
project_name = "keyboard"
def switchLayout(layout):
desired_layout_path = "/opt/" + project_name + "/symbols/" + layout
@DougBeney
DougBeney / Makefile
Last active Feb 13, 2018
QT Makefile without QMake or QT Creator
View Makefile
#########################################
# Welcome! #
# This file is intended for Mac OS X, #
# but can work on any other operating #
# systems if you change QT_INSTALL_PATH #
# -Created by @DougBeney #
#########################################
# In the first two lines, I define the source (.cpp) file and the desired output file to be created (./hello)
SOURCE = hello.cpp
@DougBeney
DougBeney / pug.rb
Created Jun 21, 2017
Jekyll Pug Plugin
View pug.rb
##
## This Plugin enables Pug support to pages and posts.
##
require 'open3'
module Jekyll
class PugConverter < Converter
@DougBeney
DougBeney / functions.php
Last active Feb 22, 2017
Truncate Yoast Breadcrumb Titles
View functions.php
<?php
//Truncate Breadcrumb title
function truncate_breadcrumb_title() {
// Get the title of the current post.
if(WPSEO_Meta::get_value( 'bctitle', get_the_ID())){
$title = WPSEO_Meta::get_value( 'bctitle', get_the_ID());
}else{
$title = get_the_title();
@DougBeney
DougBeney / functions.php
Last active Sep 1, 2016
Send Email Replies to Wordpress Comments
View functions.php
// BEGIN EMAIL COMMENT REPLY
load_plugin_textdomain('cer_plugin', false, basename( dirname( __FILE__ ) ) . '/languages' );
# Fire Email when comments is inserted and is already approved.
add_action('wp_insert_comment','cer_comment_notification',99,2);
function cer_comment_notification($comment_id, $comment_object) {
if ($comment_object->comment_approved == 1 && $comment_object->comment_parent > 0) {
$comment_parent = get_comment($comment_object->comment_parent);
@DougBeney
DougBeney / comments.php
Last active Aug 22, 2016
Barebones basic comments.php template
View comments.php
<!-- if comments are open -->
<?php if (comments_open) { ?>
<!-- Comment Form -->
<form action="<?php echo site_url('wp-comments-post.php'); ?>" method="post" >
<input type="hidden" name="comment_post_ID" id="comment_post_ID" value="<?php echo $post->ID ?>" />
<input placeholder="Name" type="text" name="author"/><br>
<input placeholder="Email" type="text" name="email"/><br>
<input placeholder="Website (optional)" type="text" name="url"/><br>