This is zero lines JS game. Only CSS and HTML, without JS =)
A Pen by Anonasaurus Rex on CodePen.
SET @oldsite='http://oldsite.com'; | |
SET @newsite='http://newsite.com'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
/* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
version: '3' | |
services: | |
############################### | |
# Built from local Dockerfile # | |
############################### | |
web: | |
# Build the Dockerfile in this directory. | |
build: . | |
# Mount this directory as a volume at /app | |
volumes: |
<?php | |
use Doctrine\DBAL\Schema\Schema; | |
// assuming you're using composer... | |
$loader = require __DIR__ . '/vendor/autoload.php'; | |
$schema = new Schema(); | |
$users = $schema->createTable('users'); |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This is zero lines JS game. Only CSS and HTML, without JS =)
A Pen by Anonasaurus Rex on CodePen.
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
find . -name '*.png' -exec basename {} \; | sort | uniq -u | wc -l |
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import itertools | |
import requests | |
import json | |
characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' | |
password_length = 6 | |
gen = itertools.combinations_with_replacement(characters,password_length) |
rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder |