A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
<?php | |
$file = '/path/to/file.png'; | |
$filename = basename($file); | |
$upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
if (!$upload_file['error']) { | |
$wp_filetype = wp_check_filetype($filename, null ); | |
$attachment = array( | |
'post_mime_type' => $wp_filetype['type'], | |
'post_parent' => $parent_post_id, |
<!-- Include jQuery from somewhere, must use version 1.8 or above --> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<!-- Include latest jquery.scrollTo, can download from https://github.com/flesler/jquery.scrollTo/releases --> | |
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.scrollto/2.1.2/jquery.scrollTo.min.js"></script> | |
<!-- Initialize the plugin, the contents of the script can be inlined here, of course --> | |
<script type="text/javascript" src="js/init.js"></script> |
#!/bin/bash | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo -i export CPPFLAGS="-DSIZEOF_LONG_INT=8" | |
sudo apt-get -y install gcc-5 g++-5 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 | |
cd ~ | |
echo "Configuring the unixODBC 2.3.1 Driver Manager" |
public static String decrypt(@NotNull String input, @NotNull String key){ | |
byte[] bytes = Base64.decodeBase64(input); | |
if(bytes.length < 17) { | |
return null; | |
} | |
byte[] ivBytes = Arrays.copyOfRange(bytes, 0, 16); | |
byte[] contentBytes = Arrays.copyOfRange(bytes, 16, bytes.length); | |