This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Getter; | |
import lombok.RequiredArgsConstructor; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.web.method.HandlerMethod; | |
import org.springframework.web.servlet.mvc.method.RequestMappingInfo; | |
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var orig = obj.fn; | |
obj.fn = function(arg1, arg2, arg3){ | |
orig.call(obj, arg1, arg2, arg3); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:security="http://www.springframework.org/schema/security" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# As root | |
apt-get update | |
apt-get install -y nginx mysql-server php5-fpm php5-mysql php5-gd libssh2-php unzip | |
mysql_install_db | |
mysql_secure_installation | |
echo 'cgi.fix_pathinfo=0' >> /etc/php5/fpm/php.ini | |
mysql -u root -p -e "DROP DATABASE IF EXISTS wordpress; CREATE DATABASE wordpress; CREATE USER wpuser@localhost IDENTIFIED BY 'WP_PASSWORD_HERE'; GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost; FLUSH PRIVILEGES;" | |
wget wordpress.org/latest.zip | |
unzip latest.zip | |
rm latest.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'), | |
prefix = require('gulp-autoprefixer'), | |
minifyCss = require('gulp-minify-css'), | |
usemin = require('gulp-usemin'), | |
uglify = require('gulp-uglify'), | |
compass = require('gulp-compass'), | |
minifyHtml = require('gulp-minify-html'), | |
livereload = require('gulp-livereload'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List the files | |
grep -lr --include=*.php "eval(gzinflate(base64_decode" . | |
# Remove the files | |
grep -lr --include=*.php "eval(gzinflate(base64_decode" . | xargs sed -i.bak 's/<?php eval(gzinflate(base64_decode[^;]*;/<?php\n/g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
client_max_body_size 4M; | |
root /var/www/wordpress; | |
index index.html index.php index.htm; | |
location / { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(angular) { | |
var origMethod = angular.module; | |
angular.modules = {}; | |
/** | |
* Register/fetch a module. | |
* | |
* @param name {string} module name. | |
* @param reqs {array} list of modules this module depends upon. | |
* @param configFn {function} config function to run when module loads (only applied for the first call to create this module). | |
* @returns {*} the created/existing module. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var saved_options = {}; | |
function getOptions(myOption){ | |
if(saved_options[myOption]){ | |
var deferred = $q.defer(); | |
deferred.resolve(saved_options[myOption]); | |
return deferred.promise; | |
}else{ | |
return $http({method: 'GET', url:'someUrl'}).then(function(data){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: QuickTime Movie Player | |
Plugin URI: http://davidwelch.co/fixme | |
Description: Plays .mov files | |
Version: 0.1 BETA | |
Author: David Welch | |
Author URI: http://davidwelch.co | |
*/ |