Another switch button made entirely with CSS. Works better with Google Chrome. Inspired by http://dribbble.com/shots/343597-Switch-button
A Pen by Cainã Maturo on CodePen.
<? | |
//CSP only works in modern browsers Chrome 25+, Firefox 23+, Safari 7+ | |
$headerCSP = "Content-Security-Policy:". | |
"connect-src 'self' ;". // XMLHttpRequest (AJAX request), WebSocket or EventSource. | |
"default-src 'self';". // Default policy for loading html elements | |
"frame-ancestors 'self' ;". //allow parent framing - this one blocks click jacking and ui redress | |
"frame-src 'none';". // vaid sources for frames | |
"media-src 'self' *.example.com;". // vaid sources for media (audio and video html tags src) | |
"object-src 'none'; ". // valid object embed and applet tags src | |
"report-uri https://example.com/violationReportForCSP.php;". //A URL that will get raw json data in post that lets you know what was violated and blocked |
I am the copyright owner of the content, "{{ $infringing_title }}" being infringed at: | |
{{ $infringing_link }} | |
You may find the original content at: | |
{{ $original_link }} | |
{{ $original_description }} |
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
Add this to your view: | |
<script> | |
window.csrfToken = '<?php echo csrf_token(); ?>'; |
<?php | |
/* | |
* Place this with the rest of your rules. | |
* Doesn't need to be in an array as there are no pipes. | |
* Password is required with a minimum of 6 characters | |
* Should have at least 1 lowercase AND 1 uppercase AND 1 number | |
*/ | |
$rules = [ | |
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/' | |
]; |
#!/bin/bash | |
# MySQL info | |
DB_USER='your-db-user' | |
DB_PSWD='your-db-password' | |
DB_HOST='localhost' | |
# Backup path, no trailing slash! | |
BACKUP_PATH='/backup/sql/path' |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
<?php | |
/** | |
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* | |
* You may also want a list of unofficial codes: | |
* | |
* 103 => 'Checkpoint', | |
* 218 => 'This is fine', // Apache Web Server | |
* 419 => 'Page Expired', // Laravel Framework |
Vagrant.configure("2") do |config| | |
ip_address = "192.168.56.1" | |
config.vm.box = "ubuntu-12.04.2-server-amd64" | |
config.vm.hostname = "chef-server.local" | |
config.ssh.timeout = 30 | |
config.vm.provider :virtualbox do |vbox| | |
vbox.customize [ "modifyvm", :id, "--memory", 1024 ] |