(Jag tog just bort 52 267 st rader med detta kommando)
DELETE FROM wp1comments WHERE comment_approved = 0;
och/eller:
#!/bin/bash | |
TOKEN="XXXXXXXXXXXXXXXXXXXXXXX" | |
EMAIL="myname@website.com" | |
DOMAIN="website.com" | |
URL="http://website.com" | |
curl https://www.cloudflare.com/api_json.html \ | |
-d "a=zone_file_purge" \ | |
-d "tkn=$TOKEN" \ |
var gulp = require("gulp"); | |
var gutil = require( 'gulp-util' ); | |
var ftp = require( 'vinyl-ftp' ); | |
var secrets = require('../secrets.json'); | |
gulp.task( 'deploy', function() { | |
var conn = ftp.create( { | |
host: secrets.servers.production.serverhost, | |
user: secrets.servers.production.username, |
document.addEventListener("DOMContentLoaded", function(event) { | |
var elements = { | |
index_about_toggle: document.getElementsByClassName("index_about")[0], | |
index_about: document.getElementsByClassName("index_about")[0], | |
index_blog: document.getElementsByClassName("index_blog")[0], | |
index__projects: document.getElementsByClassName("index__projects")[0], | |
}; | |
function scrollTo(element, to, duration) { |
<?php $post_id = $post->ID; | |
if ( isset( $_POST['html-upload'] ) && !empty( $_FILES ) ) { | |
require_once(ABSPATH . 'wp-admin/includes/admin.php'); | |
$id = media_handle_upload('async-upload', $post_id); | |
unset($_FILES); | |
if ( is_wp_error($id) ) { | |
$errors['upload_error'] = $id; | |
$id = false; |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
dir = Dir.pwd | |
vagrant_dir = File.expand_path(File.dirname(__FILE__)) | |
Vagrant.configure("2") do |config| | |
# Store the current version of Vagrant for use in conditionals when dealing | |
# with possible backward compatible issues. |
function my_login_redirect( $url, $request, $user ){ | |
if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) { | |
$userurl = get_userdata($user->ID); | |
$url = home_url('/dashboard/'.$userurl->user_login); | |
} | |
return $url; | |
} | |
add_filter('login_redirect', 'my_login_redirect', 10, 3 ); |
location / { | |
rewrite ^/.*/$ / last; # Redirect everything to / (ex index.html) and let the JS router take care of the rest | |
rewrite ^([^.]*[^/])$ $1/ permanent; # Force trailing slash | |
} |
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"default_dir": "/Applications/MAMP/htdocs/", | |
"draw_indent_guides": true, | |
"find_selected_text": true, | |
"folder_exclude_patterns": | |
[ |
[ | |
// Use Cmd + E for commenting multiple rows/blocks of code | |
{ "keys": ["super+e"], "command": "toggle_comment", "args": { "block": false } }, | |
{ "keys": ["super+shift+e"], "command": "toggle_comment", "args": { "block": true } }, | |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" }, | |
{ "keys": ["super+alt+r"], "command": "reindent"}, | |
] |