Skip to content

Instantly share code, notes, and snippets.

View easychen's full-sized avatar
❄️
休息,休息一会儿

Easy easychen

❄️
休息,休息一会儿
View GitHub Profile
@easychen
easychen / README.MD
Created August 6, 2021 17:40 — forked from raisiqueira/README.MD
Install Docker

Install Docker

https://github.com/eon01/DockerCheatSheet

Install

curl -fsSL https://get.docker.com | sh;

docker-compose

<?php
function mypost( $url , $data )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
@easychen
easychen / gist:adb5e364193f48d9db74a43a77b30a93
Last active February 4, 2020 03:36
157家公司招聘前端应届生的技术关键词词频表
单篇招聘启事排重后的新词频
[javascript] => 152
[css] => 134
[web] => 101
[html5] => 74
[html] => 72
[react] => 56
[jquery] => 52
[vue] => 50
@easychen
easychen / weibopicbed.js
Created July 16, 2017 08:30
微博图床上传函数
// from https://github.com/suxiaogang/WeiboPicBed
// under its license
function uploadToWeibo( url , callback )
{
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function( e )
{
@easychen
easychen / README.md
Created January 28, 2019 04:33
SCRIPT-8
@easychen
easychen / timetodo.group.php
Created December 9, 2018 02:08
分组存储
<?php
if( preg_match("/:save\s(.+?)$/i" , $cmd , $out ) )
{
file_put_contents( "saestor://todo/ttd-easy-". md5($out[1]) .".json" , v('todos') );
$ret['js'] = "alert('Saved to ". $out[1] ." 🤠 ')";
}
elseif( preg_match("/:load\s(.+?)$/i" , $cmd , $out ) )
{
if($new_todos = file_get_contents( "saestor://todo/ttd-easy-". md5($out[1]) .".json" ))
<?php
if( preg_match("/:bing\s(.+?)$/i" , $cmd , $out ) )
{
$ret['js'] = 'window.require("electron").shell.openExternal("https://cn.bing.com/dict/search?q=' . urlencode($out[1]) . '");';
}
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: origin, x-requested-with, content-type');
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS');
@easychen
easychen / token.sol
Created March 28, 2018 04:52
代币演示合约
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval (address _from, uint256 _value, address _token, bytes _extraData) external; }
contract FangTangCoin {
string public name;
string public symbol;
uint8 public decimals = 18;
uint256 public totalSupply;
address private creator;
@easychen
easychen / main.js
Created March 30, 2018 10:52
Electron Main.js demo
const electron = require('electron');
const {app} = electron;
const {BrowserWindow} = electron;
let win;
function createWindow() {
win = new BrowserWindow({width: 600, height: 1080});
win.loadURL(`file://${__dirname}/index.html`);