start new:
tmux
start new with session name:
tmux new -s myname
#################################################### | |
# WARNING: This is very hacky! Use at your own risk. | |
# | |
# This assumes you have all keys in a single DB and | |
# want to move them all to DB 0. If you have keys | |
# in more than one DB, the first DB found will be | |
# rewritten to 0, with all others left alone. | |
#################################################### | |
import shutil |
<?php | |
/** | |
* Namespace Migration Script | |
* | |
* @author Rasmus Schultz <[email protected]> | |
* @license http://www.gnu.org/licenses/gpl-3.0.txt | |
* | |
* This script will scan through an entire PHP codebase and rewrite the | |
* scripts, adding a namespace clause based on the directory structure, |
. | |
├── deploy.py | |
├── project | |
│ ├── application.py | |
│ ├── apps | |
│ │ ├── articles | |
│ │ │ ├── forms.py | |
│ │ │ ├── __init__.py | |
│ │ │ ├── models.py | |
│ │ │ └── views.py |
#!/bin/bash | |
##################################################### | |
# To run, simply: chmod +x medusa.sh && ./medusa.sh # | |
##################################################### | |
# Successful publickey connections | |
echo '==== Successful SSH Public Key Connections ====' | |
CONNECTIONS=`grep "sshd.*Accepted publickey" /var/log/auth.log` | |
while read -r line; do |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
DateTime.ToString() Patterns | |
All the patterns: | |
0 MM/dd/yyyy 08/22/2006 | |
1 dddd, dd MMMM yyyy Tuesday, 22 August 2006 | |
2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30 | |
3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM | |
4 dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30 | |
5 dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM |
#find . -type f -name '*.png' -exec optipng -o5 -quiet -preserve {} \; | |
#find . -type f -name '*.jp*' -exec mogrify -compress jpeg -quality 70 {} \; | |
find . -type f -iname "*.jp*g" | xargs mogrify -resize '1280x1280>' | |
find . -type f -iname "*.jp*g" | xargs jpegoptim --strip-all --max=90 | |
# With parallel | |
find . -type f -iname "*.jp*g" -print0 | parallel --progress -0 -j +0 "mogrify -resize 1280x1280\> {}" | |
find . -type f -iname "*.jp*g" | parallel --progress "jpegoptim --strip-all --max=65 {}" |
Ids or names of elements (primitives or complexes) must be written in Camel Case and must to be as short as possible. All id or name must to start with one of the defined element type prefixes.
All element ids or names must use Hungarian notation to incorporate the type of element. Prefixes are used to indicate the semantic type of the element, rather than it's underlining implementation. It means that the element of GUI with button look & feel must prefixed as btn
, regardless of how it is implemented, with tag <button>
or with tag <a>
.
Prefixes are lowercase strings of 2, 3 or 4 characters. Here a complete list of authorised prefixes:
#!/bin/bash | |
# sample code demonstrating a pattern search with SCAN | |
# using a COUNT "work intent" | |
if [ $# -ne 3 ] | |
then | |
echo "Find matching a pattern using SCAN " | |
echo "Usage: $0 <host> <port> <pattern>" | |
exit 1 |