Skip to content

Instantly share code, notes, and snippets.

View asika32764's full-sized avatar

Simon Asika asika32764

View GitHub Profile
@asika32764
asika32764 / add_composer.xml
Created July 4, 2015 13:33
Add Composer to OpenCart 2.0
<modification>
<id>Add composer</id>
<version>1.0</version>
<vqmver>1.0.8</vqmver>
<author>Simon Asika</author>
<file name="system/startup.php">
<operation>
<search position="after"><![CDATA[
require_once(DIR_SYSTEM . 'helper/utf8.php');
]]></search>
<?php
class BlogRouter extends JComponentRouterBase
{
public function build(&$queries)
{
$segments = array();
$params = array(
'view',
<?php
// Get Base URI
$baseUri = str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname($_SERVER['SCRIPT_FILENAME']));
$http = str_replace(array('/', '\\'), '/', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . $baseUri . '/');
$catalog = explode('/', $http);
array_pop($catalog);
array_pop($catalog);
$catalog = implode('/', $catalog) . '/';
<?php
/* Gets individual core information */
function GetCoreInformation() {
$data = file('/proc/stat');
$cores = array();
foreach( $data as $line ) {
if( preg_match('/^cpu[0-9]/', $line) )
{
$info = explode(' ', $line );
$cores[] = array(
#!/usr/bin/env bash
GROUP=`id -gn $USER`;
CONFFILE="/Applications/XAMPP/xamppfiles/etc/httpd.conf";
HTTPCONF=$(cat $CONFFILE);
echo "更改 XAMPP 的各項密碼...";
sudo /Applications/XAMPP/xamppfiles/xampp security
// 原始程式來源: http://practicalcryptography.com/ciphers/enigma-cipher/ 網頁內的 javascript 程式碼
var c = console;
var plaintext = 'ABCDEF';
c.log('>> plaintext2 : '+plaintext);
var ciphertext = Encrypt(plaintext, 'AAA', 'AAA', '123', 'POMLIUKJNHYTGBVFREDC');
c.log('>> ciphertext : '+ciphertext);
var plaintext2 = Encrypt(ciphertext, 'AAA', 'AAA', '123', 'POMLIUKJNHYTGBVFREDC');
c.log('>> plaintext2 : '+plaintext);
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 2 columns, instead of 3 in line 6.
,
|%d week ago|,|%d 周以前|
|%s Host|,|%s 主机|
|%s ago|,|%s 前|
|-- General Ticket --|,|-- 未定义 --|
?,忘记密码?
|A fresh account with default settings will be re-created. This can help you remove all default files created by Website Builder or Autoinstaller, so you will be able to install new scripts without any errors afterward.|,这个功能将重置该网站账户的所有信息,并载入默认设置。
Abuse,滥用
|Access Webmail|,访问网页邮箱
|Access your Website at|,访问你的网站

Cmder是一款Windows環境下非常簡潔美觀易用的cmd替代者,它支持了大部分的Linux命令。

<?php
class UserModel
{
protected $state = array();
public function getUsers()
{
$published = $this->getState('where.published', 1);