Skip to content

Instantly share code, notes, and snippets.

View fulicat's full-sized avatar

Jack Chan fulicat

  • Social Power Information Technology(Shanghai) Co.,Ltd.
  • Shanghai, China
View GitHub Profile
@NikolayIT
NikolayIT / SimpleHttpServerWithTcpListener.cs
Created September 16, 2018 12:26
Simple HTTP server in .NET Core using TcpListener
namespace SimpleHttpServer
{
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public static class Program
{
public static void Main(string[] args)
@rowej83
rowej83 / vue.config.js
Last active December 4, 2019 13:22
webpack 4 vue cli 3 - single js and css output with static name (app.js & app.css)
//const path = require('path');
const ExtractTextPlugin = require('mini-css-extract-plugin');
module.exports = {
configureWebpack:{ optimization:{
splitChunks:false
}},
chainWebpack: config => {
config.output
.filename('js/[name].js')
@Integ
Integ / unwxapkg.py
Last active March 26, 2024 02:51 — forked from feix/unwxapkg.py
A useful tool for unpack wxapkg file with python3 surport.
# coding: utf-8
# py2 origin author lrdcq
# usage python3 unwxapkg.py filename
__author__ = 'Integ: https://github.com./integ'
import sys, os
import struct
class WxapkgFile(object):
@barbietunnie
barbietunnie / stop-mac-apache.sh
Created February 25, 2017 22:42
Stop Default Apache server running on Mac OS Sierra
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
@define-private-public
define-private-public / HttpServer.cs
Last active May 9, 2024 15:06
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@fulicat
fulicat / .bash_profile
Created May 3, 2016 15:22
Install NGINX, PHP-FPM (5.5.6), Mongo and MySql
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
@SiZapPaaiGwat
SiZapPaaiGwat / webpack.nginx.conf
Last active November 19, 2021 19:10
webpack-dev-server configuration in nginx on development server
upstream ws_server {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 10.1.2.225;
location / {
proxy_pass http://ws_server/;
@fulicat
fulicat / export-html-table-to-excel.md
Created January 13, 2016 03:03 — forked from umidjons/export-html-table-to-excel.md
Export HTML table to Excel in AngularJS

Export HTML table to Excel in AngularJS

myApp.factory('Excel',function($window){
		var uri='data:application/vnd.ms-excel;base64,',
			template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
			base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
			format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
		return {
@yuezk
yuezk / format-detection.html
Created November 10, 2015 09:16
HTML format-detection meta tag
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="date=no">
<meta name="format-detection" content="address=no">
<meta name="format-detection" content="email=no">
@chitanda
chitanda / postFakeAppleID-Parameter Ver
Last active June 16, 2017 04:05
循环往钓鱼网站库里写虚假帐号和密码。目前自动模式只支持form表格提交的钓鱼网站。使用方法:在钓鱼网站页面打开浏览器开发者工具,将下面的代码复制到`console`中运行即可。自定义效果的话只需要按照函数说明的样式填写四个参数即可。eg loopPost(10,12,2000,2000)
/**
* [loopPost 循环往钓鱼网站库里写虚假帐号和密码。目前自动模式只支持form表格提交的钓鱼网站]
* @param {[type]} min [帐号和密码的最小长度,默认为6]
* @param {[type]} max [帐号和密码的最大长度,默认为12]
* @param {[type]} timeGap [发送数据的时间间隔,单位为ms,不需要填写单位。默认为500]
* @param {[type]} times [一共发送的虚假帐号个数,默认为5000]
* @return {[type]} [description]
*/
function loopPost(min,max,timeGap,times){