Step 1 : Backup working settings folder
cp -R /etc/sysconfig/network-scripts /etc/sysconfig/network-scripts_bak
Step 2 : Create bash file at /root/network.sh
with below content
#!/usr/bin/env bash
<?php | |
// Class BitField | |
class BitField | |
{ | |
protected $roles = array(); | |
protected $permission; | |
public function __construct() | |
{ | |
$this->setPermission(0); | |
} |
Step 1 : Backup working settings folder
cp -R /etc/sysconfig/network-scripts /etc/sysconfig/network-scripts_bak
Step 2 : Create bash file at /root/network.sh
with below content
#!/usr/bin/env bash
#!/usr/bin/env python | |
# | |
# Very simple Python script to dump all emails in an IMAP folder to files. | |
# This code is released into the public domain. | |
# | |
# RKI Nov 2013 | |
# | |
import sys | |
import imaplib | |
import getpass |
// Paste this code in to Console | |
var a = $('.braille-contest-code')[1]; | |
var items = $(a).find('.word'); | |
var m = []; | |
var map = { | |
0: 0, | |
1: 3, | |
2: 1, | |
3: 4, | |
4: 2, |
// Source : https://groups.google.com/d/msg/silex-php/ceKqVPlwLg0/kPkcM5Hx5owJ | |
if ( $app['debug'] ) { | |
$logger = new Doctrine\DBAL\Logging\DebugStack(); | |
$app['db.config']->setSQLLogger($logger); | |
$app->error(function(\Exception $e, $code) use ($app, $logger) { | |
if ( $e instanceof PDOException and count($logger->queries) ) { | |
// We want to log the query as an ERROR for PDO exceptions! | |
$query = array_pop($logger->queries); | |
$app['monolog']->err($query['sql'], array('params' => | |
$query['params'], 'types' => $query['types'])); |
{"01":{"id":"01","name":"H\u00e0 N\u1ed9i","type":"Th\u00e0nh Ph\u1ed1","children":{"001":{"id":"001","name":"Ba \u0110\u00ecnh","type":"Qu\u1eadn","location":"21 02 08N, 105 49 38E","parent_id":"01","children":[]},"002":{"id":"002","name":"Ho\u00e0n Ki\u1ebfm","type":"Qu\u1eadn","location":"21 01 53N, 105 51 09E","parent_id":"01","children":[]},"003":{"id":"003","name":"T\u00e2y H\u1ed3","type":"Qu\u1eadn","location":"21 04 10N, 105 49 07E","parent_id":"01","children":[]},"004":{"id":"004","name":"Long Bi\u00ean","type":"Qu\u1eadn","location":"21 02 21N, 105 53 07E","parent_id":"01","children":[]},"005":{"id":"005","name":"C\u1ea7u Gi\u1ea5y","type":"Qu\u1eadn","location":"21 01 52N, 105 47 20E","parent_id":"01","children":[]},"006":{"id":"006","name":"\u0110\u1ed1ng \u0110a","type":"Qu\u1eadn","location":"21 00 56N, 105 49 06E","parent_id":"01","children":[]},"007":{"id":"007","name":"Hai B\u00e0 Tr\u01b0ng","type":"Qu\u1eadn","location":"21 00 27N, 105 51 35E","parent_id":"01","children":[]},"008":{"id":"0 |
var links = $$('._42ft._42fu._4-s1._2agf._p._42gx');
var i = 0;
unlike_all = function () {
links[i].click();
server { | |
listen 80; | |
server_name example.com www.example.com; | |
if ($http_x_forwarded_proto = "http") { | |
return 301 https://$server_name$request_uri; | |
} | |
... directives to generate a response | |
} |
-- Ref : http://stackoverflow.com/a/19301922 | |
SELECT CONCAT("ALTER TABLE `",TABLE_SCHEMA,"`.`",TABLE_NAME,"` CHARACTER SET utf8 COLLATE utf8_unicode_ci;", | |
"ALTER TABLE `",TABLE_SCHEMA,"`.`",TABLE_NAME,"` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;") | |
AS `alter_sql` | |
FROM `information_schema`.TABLES | |
WHERE TABLE_SCHEMA = 'db_name'; |