Skip to content

Instantly share code, notes, and snippets.

View hobodave's full-sized avatar
🎯
Focusing

David Abdemoulaie hobodave

🎯
Focusing
View GitHub Profile
{"result": {"c": [
{"o":15,"l":5,"t":["seven","Sven","Severn","Seine","seine"]},
{"o":35,"l":7,"t":["Fathers","fathers","Father's","father's","feathers"]},
{"o":65,"l":10,"t":["Continent","continent","contingent","containment","continents"]}]},
"id":"48","jsonrpc":"2.0"}
#!/usr/bin/env ruby
require 'ftools'
require 'optparse'
require 'find'
class PhpGhettoDoc
Class_Doc = <<-EOF
/**
[zym@ns7 ~]$ ps aux | grep zym
zym 3271 1.0 8.1 178928 83368 ? S 23:46 0:03 Passenger ApplicationSpawner: /home/zym/railsapps/redmine
zym 3278 0.2 8.2 182140 84776 ? S 23:46 0:00 Rails: /home/zym/railsapps/redmine
zym 3635 0.0 0.0 65600 956 pts/1 R+ 23:51 0:00 ps aux
zym 3636 0.0 0.0 61188 732 pts/1 R+ 23:51 0:00 grep zym
root 31805 0.0 0.3 87940 3188 ? Ss 22:55 0:00 sshd: zym [priv]
zym 31859 0.0 0.1 87940 1640 ? S 22:56 0:00 sshd: zym@pts/1
zym 31861 0.0 0.1 66068 1572 pts/1 Ss 22:56 0:00 -bash
[zym@ns7 ~]$ which git
/usr/local/bin/git
mysql> select page, round(wtime - utime - stime - mysql_time, 5) as lost, wtime,
-> utime,stime, mysql_time from performance_log_090425;
+-------------------------+---------+----------+----------+----------+------------+
| page | lost | wtime | utime | stime | mysql_time |
+-------------------------+---------+----------+----------+----------+------------+
| /chony/mm/orders | 0.17919 | 0.618413 | 0.338332 | 0.070625 | 0.030267 |
| /chony/admin | 0.05789 | 0.271856 | 0.153192 | 0.059398 | 0.001375 |
| /chony/mm/orders | 0.02276 | 0.424403 | 0.327653 | 0.068735 | 0.005253 |
| /chony/mm/orders?page=2 | 0.09281 | 0.647109 | 0.357999 | 0.054147 | 0.142151 |
| /chony/mm/orders?page=3 | 0.01913 | 0.443701 | 0.325411 | 0.054374 | 0.04479 |
SELECT
Submitter,
SUM( CASE col WHEN '0' THEN data ELSE 0 END ) AS 'Bad',
SUM( CASE col WHEN '2004' THEN data ELSE 0 END ) AS '2004',
SUM( CASE col WHEN '2005' THEN data ELSE 0 END ) AS '2005',
SUM( CASE col WHEN '2006' THEN data ELSE 0 END ) AS '2006',
SUM( CASE col WHEN '2007' THEN data ELSE 0 END ) AS '2007',
SUM( CASE col WHEN '2008' THEN data ELSE 0 END ) AS '2008',
SUM( CASE col WHEN '2009' THEN data ELSE 0 END) AS '2009',
SUM( data ) AS Total
array
'num_created' =>
array
0 =>
array
'division_id' => string '4' (length=1)
'DAYOFMONTH(created)' => string '1' (length=1)
'num_created' => string '123' (length=3)
1 =>
array
# at 895589273
#090706 12:00:08 server id 1 end_log_pos 895589478 Query thread_id=1819319 exec_time=0 error_code=1142
use sentact_sbch/*!*/;
SET TIMESTAMP=1246906808/*!*/;
SET @@session.pseudo_thread_id=1819319/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=3, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=33/*!*/;
mysql> show triggers IN sentact_sbch LIKE 'user%'\G
*************************** 1. row ***************************
Trigger: log_user_insert
Event: INSERT
Table: users
Statement: CALL update_transaction_log('users',NEW.id,'insert')
Timing: AFTER
Created: NULL
sql_mode:
Definer: sentact_sbch@localhost
[Session]
session.save_handler = files
session.use_cookies = 1
session.name = PHPHOBOSESS
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere loopback/8 reject-with icmp-port-unreachable
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:http