Skip to content

Instantly share code, notes, and snippets.

View jdrydn's full-sized avatar

jdrydn jdrydn

View GitHub Profile
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@bergie
bergie / .gitignore
Created September 19, 2011 15:50
Node.js email handling examples
config.json
reading-image.png
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@SiriusDely
SiriusDely / push_apns.php
Created May 2, 2012 00:23
Push Notification PHP Script - Apple iOS, Android C2DM, BlackBerry PPG
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';
@tgvashworth
tgvashworth / .gitconfig
Last active December 13, 2022 14:15
.gitconfig & .gitignore
# A ~/.gitconfig file
[user]
name = YOUR NAME
email = YOUR EMAIL
[github]
user = YOUR USERNAME
token = YOUR TOKEN
[core]
quotepath = false
editor = nvim
lass KeenHttpOutput < Fluent::Output
Fluent::Plugin.register_output('out-keen-http', self)
def initialize
super
require 'rubygems'
require 'eventmachine'
require 'em-http-request'
require 'cgi'
require 'json'
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

/*
* Flatten Object @gdibble: Inspired by https://gist.github.com/penguinboy/762197
* input: { 'a':{ 'b':{ 'b2':2 }, 'c':{ 'c2':2, 'c3':3 } } }
* output: { 'a.b.b2':2, 'a.c.c2':2, 'a.c.c3':3 }
*/
var flattenObject = function(ob) {
var toReturn = {};
var flatObject;
for (var i in ob) {
if (!ob.hasOwnProperty(i)) {
@nitincoded
nitincoded / xrdp-on-lubuntu-1604.txt
Last active April 24, 2019 14:20
Enable XRDP on Lubuntu 16.04
First open a terminal and enter sudo apt-get install xrdp. When that is installed enter sudo nano /etc/xrdp/startwm.sh in the terminal. Make sure the last line looks like this:
. /etc/X11/Xsession
Then go to your home folder, rightclick and select Show hidden. If there is no file named .xsession, create it. If there is a filed named like that, open it and make sure that it looks like this when your done: lxsession -e LXDE -s Lubuntu
Now type sudo service xrdp restart in the terminal to restart xrdp. Now it should work :)
answered Feb 1 '15 at 9:52