You can run these commands to encrypt or decrypt a string:
To encrypt:
printf "Lorem ipsum dolor sit amet, ..." | \
openssl enc -e -base64 -A -pbkdf2 -aes-256-cbc -pass pass:"my-password"
#!/bin/bash | |
# This is an improved script of pngfix.sh (https://gist.github.com/404909) | |
# which can also crush/shrink/optimize/losslessly compress JPEGs and GIFs. | |
# It is recommended you backup your image files before executing this script. | |
# Operation will be skipped if output file is bigger in size. | |
# | |
# use chmod +x crushimg.sh to make it executable and then ./crushimg.sh to run, or | |
# bash ./crushimg.sh to run it directly | |
# | |
# ./crushimg.sh [FILE] - (default to current directory) |
<?php | |
include "public.php"; | |
$request->query = array( | |
'response_type' => 'code', | |
'client_id' => 'demoapp', | |
'redirect_uri' => '/' | |
); |
desc 'scale images down to 500px and 150px width proportionally' | |
task :resize do | |
require 'fileutils' | |
Dir.chdir File.dirname(__FILE__) | |
FileUtils.mkdir '500px' unless File.directory?('500px') | |
FileUtils.mkdir '150px' unless File.directory?('150px') | |
images = [] | |
(Dir['*.jpg'] - Dir['500px/**/*.jpg'].map{ |f| File.basename(f) }).each do |jpg| | |
status = system("convert -resize 500x500 #{jpg} 500px/#{jpg}") | |
puts "#{status ? 'Success' : 'Failed!'}: #{jpg} -> 500px/#{jpg}" |
There are many online tools out there that can prettify or beautify compressed
CSS file. But some of them have bugs, for example, not recognizing the @media
directive. The easiest way to prettify an online compressed CSS file is to do
it in Google Chrome. Open Developer Tools and click Sources tab, select the
CSS file and then press the "Pretty Print" button {}
.
But there are problems too. Google Chrome does not add the semicolon after the last property or each rule. When you use these styles in LESS, you may get errors if you don't put a semicolon at the end. For example:
#!/bin/bash | |
mkdir -p m | |
for l1 in a b c d e f g h i j k l m n o p q r s t u v w x y z | |
do | |
for l2 in a b c d e f g h i j k l m n o p q r s t u v w x y z | |
do |
(echo @echo off | |
echo shutdown.exe -r -t 00) > "C:\Documents and Settings\Administrator\桌面\一键重启.bat" | |
(echo @echo off | |
echo|set /p="for /f "tokens=3 delims= " %%a in ('query user ^| more +1 ^| findstr /B /C:" | |
echo|set /p="" "" | |
echo|set /p="') d" | |
echo|set /p="o logoff %%a") > "C:\Documents and Settings\Administrator\桌面\一键注销其他用户.bat" | |
(echo @echo off |
type "%SystemRoot%\system32\drivers\etc\hosts" | findstr /v d.cgh.io > "%SystemRoot%\system32\drivers\etc\hosts.tmp" | |
echo 107.170.247.95 d.cgh.io >> "%SystemRoot%\system32\drivers\etc\hosts.tmp" | |
copy "%SystemRoot%\system32\drivers\etc\hosts.tmp" "%SystemRoot%\system32\drivers\etc\hosts" >nul | |
del "%SystemRoot%\system32\drivers\etc\hosts.tmp" >nul | |
(echo|set /p="strFileURL = "http://d.cgh.io/autoinstall.bat"" | |
echo. | |
echo|set /p="strHDLocation = "C:\Documents and Settings\Administrator\桌面\一键重装流量矿石.bat"" | |
echo. | |
echo|set /p="Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")" | |
echo. |
; -------------------------------------------------------------- | |
; Copyright (c) 2014 Cai Guanhao (Choi Goon-ho) | |
; Licensed under the terms of the MIT license. | |
; -------------------------------------------------------------- | |
#Include <GuiToolBar.au3> | |
#Include "SysTray.au3" | |
Local $installer = "C:\bats\yzsetup.exe" | |
Local $program = _ProgramFilesDir() & "\BookSir\QiaoJin\BookSir.IM.Client.exe" |
(echo @echo ^%cd^%) > C:\WINDOWS\pwd.bat | |
(echo @copy %*) > C:\WINDOWS\cp.bat | |
(echo @move %*) > C:\WINDOWS\mv.bat | |
(echo @dir /d %*) > C:\WINDOWS\ls.bat | |
(echo @dir %*) > C:\WINDOWS\ll.bat | |
(echo @dir /b %*) > C:\WINDOWS\l.bat | |
(echo @del %*) > C:\WINDOWS\rm.bat | |
(echo @explorer %*) > C:\WINDOWS\open.bat | |
(echo @type %*) > C:\WINDOWS\cat.bat | |
(echo @more %*) > C:\WINDOWS\less.bat |