Skip to content

Instantly share code, notes, and snippets.

View kopepasah's full-sized avatar
🤖
Solving problems with bots.

Justin Kopepasah kopepasah

🤖
Solving problems with bots.
View GitHub Profile
@kopepasah
kopepasah / _get-parameters.md
Last active November 4, 2015 13:57
A simple JavaScript helper method for getting the query parameters of a URL and storing those parameters as an object.

Get Parameters

A simple JavaScript helper method for getting the query parameters of a URL and storing those parameters as an object. If no parameters are present, the method will return false.


Author: Justin Kopepasah justin@kopepasah.com
License: MIT https://opensource.org/licenses/MIT

@kopepasah
kopepasah / textmate-softwrap-example.js
Last active October 22, 2015 07:47
Demonstration of soft wrap in TextMate based on a wrap column setting of 80, even thought soft wrap is disabled.
|
|
// This is a comment that will be wrapped by softwrap (while other code is not |
softwrapped) when softwrap is disabled but wrap column is set to 80. |
$(function(){ |
$( 'example-code-no-wrapped' ).not().ever.().wrapped().no().matter().how().long().the().code().runs();
$( 'example-code-wrapped' |
).unnecesarily.wrapped().because().of().a().comment(); // Comment |
forces softwrap. |
}); |

Keybase proof

I hereby claim:

  • I am kopepasah on github.
  • I am kopepasah (https://keybase.io/kopepasah) on keybase.
  • I have a public key whose fingerprint is 560F CC5F 01D2 6C2D FC59 8236 920E 5153 BB7C 3584

To claim this, I am signing this object:

@kopepasah
kopepasah / _README.md
Created February 10, 2015 07:22
Update your WordPress git submodule quickly with this script.

Update WordPress Script

Use this script to quickly update to the latest version of WordPress.

Requirements:

  1. WordPress should be located in subdirectory of root (i.e. site-root/wp).
  2. Requires WordPress to be a git submodule.
@kopepasah
kopepasah / subdomain.redirect.config
Created December 29, 2014 05:52
An .htaccess configuration for redirecting to a subdomain and keeping the path.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://sub.domain.com/$1 [R=301,L]
@kopepasah
kopepasah / hide.svn-git.config
Created December 29, 2014 05:51
An .htaccess configuration for hiding SVN/Git files.
# Hide SVN / GIT files
RedirectMatch 404 /\\.(git|gitignore|gitmodules|sh|svn|log|htaccess|htpasswd|ini|phps|fla|psd)(/.*|$)
@kopepasah
kopepasah / delete-cache.bash
Last active June 7, 2017 15:44
A command to clear the content cache for Nginx.
find /path/to/cache -type f -delete
@kopepasah
kopepasah / 0_reuse_code.js
Created May 31, 2014 14:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kopepasah
kopepasah / 6100.md
Last active August 29, 2015 14:01
Filter WordPress Link Query Args to Show Scheduled Items

Filter WordPress Link Query Args to Show Scheduled Items

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code 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 version.

@kopepasah
kopepasah / 6097.md
Last active August 29, 2015 14:01
Disable Jetpack's Twitter Cards

Disable Jetpack's Twitter Cards

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code 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 version.