Skip to content

Instantly share code, notes, and snippets.

View jjsty1e's full-sized avatar

jjsty1e jjsty1e

View GitHub Profile
<?php
echo "hello";
class Jake{
private $name;
public function set($name){
$this->name = $name;
}
}
$man = new Jake('Jakesoft');
@jjsty1e
jjsty1e / Config.class.php
Created June 8, 2016 05:55
获取配置
<?php
/**
* Description replace from your description
* Created by Jetbrains PhpStorm.
* User: Jake <singviy@gmail.com>
* Created: 2016/6/7 9:39
*/
class Config
<?php
/**
*去除所有文件BOM
* usage:命令行进入到项目根目录,执行 php clear_bom.php
*author Caihong_tang
*@created 2016-6-13 10:05:34
*/
if (isset($_GET['dir'])){
$basedir=$_GET['dir'];
}
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017-03-31
* Time: 10:44
*/
namespace AppBundle\Services;
@jjsty1e
jjsty1e / a.conf
Last active June 5, 2017 08:11
apache https configuration
<VirtualHost *:443 *:80>
DocumentRoot "/path/to/webRoot"
ServerName yourServerName
<IfModule ssl_module>
SSLEngine on
SSLCertificateFile "/path/to/crtFileName.crt"
SSLCertificateKeyFile "/path/to/keyFileName.key"
</IfModule>
@jjsty1e
jjsty1e / nginx.conf
Created June 7, 2017 08:02
nginx.conf
server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://www.domain.com$request_uri;
}
server {
listen 443;
server_name www.domain.com domain.com;
root /alidata/www/geekerism;
@jjsty1e
jjsty1e / keng.php
Last active June 14, 2017 00:13
php大坑
<?php
function getReferer($link)
{
$refMap = [
'baidu' => '百度',
'sougou' => '搜狗',
'360' => '360',
'google' => '谷歌'
];
@jjsty1e
jjsty1e / sort.php
Created June 14, 2017 06:09
my sort
<?Php
$len = count($arr);
for ($i = 0; $i < $len; $i++) {
for ($j = 0; $j < $i; $j++) {
if ($arr[$i] < $arr[$j]) {
$temp = $arr[$i];
$arr[$i] = $arr[$j];
$arr[$j] = $temp;
@jjsty1e
jjsty1e / mq.js
Created September 7, 2017 10:13
web qq中的一份js代码
/**
* @license almond 0.3.2 Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
*/
//Going sloppy to avoid 'use strict' string cost, but strict practices should
//be followed.
/*global setTimeout: false */
var requirejs, require, define;
(function (undef) {
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md