Skip to content

Instantly share code, notes, and snippets.

Avatar
👿
work work!

OnO flxxyz

👿
work work!
View GitHub Profile
View area.js
function Dsy(){
this.Items = {};
}
Dsy.prototype.add = function(id,iArray){
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id){
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
@flxxyz
flxxyz / ip_scan_nmap.py
Created Jan 6, 2018
nmap插件扫描本地ip段内在线的机器
View ip_scan_nmap.py
#encodeing:utf8
import os
try:
import netifaces
import nmap
except ImportError:
try:
command_to_execute = "pip install netifaces python-nmap || easy_install netifaces python-nmap"
@flxxyz
flxxyz / aria2c.sh
Created Jan 6, 2018
aria2c自建管理脚本
View aria2c.sh
#!/bin/sh
path=`pwd`
case "$1" in
start)
echo -n "Starting aria2c"
aria2c --conf-path=${path}'/conf/aria2.conf' -D
;;
stop)
@flxxyz
flxxyz / function.js
Last active Jan 11, 2018
预定义字符串,随机打乱成新字符串滚动,控制运行时间
View function.js
function str_rand_scroll(el, time, str) {
try {
if (el === undefined) throw '没有传入变量el';
try {
if (time === undefined) throw '没有传入变量time';
try {
if (str === undefined) {
// var str = '一乙二十丁厂七卜八人入儿匕几九刁了刀力乃又三干于亏工土士才下寸大丈与万上小口山巾千乞川亿个夕久么勺凡丸及广亡门丫义之尸己已巳弓子卫也女刃飞习叉马乡丰王开井天夫元无云专丐扎艺木五支厅不犬太区历歹友尤匹车巨牙屯戈比互切瓦止少曰日中贝冈内水见午牛手气毛壬升夭长仁什片仆化仇币仍仅斤爪反介父从仑今凶分乏公仓月氏勿欠风丹匀乌勾凤六文亢方火为斗忆计订户认冗讥心尺引丑巴孔队办以允予邓劝双书幻玉刊未末示击打巧正扑卉扒功扔去甘世艾古节本术可丙左厉石右布夯戊龙平灭轧东卡北占凸卢业旧帅归旦目且叶甲申叮电号田由只叭史央兄叽叼叫叩叨';
var str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+'
}
@flxxyz
flxxyz / click_str.js
Created Jun 29, 2018
点击网页随机出现预设的文字
View click_str.js
$(document).click(function() {
var a = ['富强', '民煮', '自由', '平等', '友爱', '河蟹', '神马', '香甜'];
var v = a[Math.floor(Math.random() * a.length)];
var tips = $('<div style="position:fixed;z-index:9999;color:red;top:200px;left:600px"></div>').text(v).animate({top:'160px'}, 750, function() {$(this).remove()});
$('body').append(tips);
})
@flxxyz
flxxyz / example.js
Created Jul 6, 2018
javascript简易时间处理类
View example.js
var w = require('./with.js');
const serveTime = '2017-01-01 00:00:00';
setInterval(()=> {
console.log(w.serve(serveTime));
}, 1000);
@flxxyz
flxxyz / url_query_str.js
Created Jul 7, 2018
javascript自用简易获取url参数
View url_query_str.js
var url = {
key: function _get(name, query) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
if (query) {
var r = query.match(reg);
} else {
var r = window.location.search.substr(1).match(reg);
}
if (r != null) {
return unescape(r[2]);
@flxxyz
flxxyz / Config.php
Last active Jul 7, 2018
自用简易控制器
View Config.php
<?php
namespace App;
class Config
{
private static $name = '';
private static $arr = [];
/**
* @return array
*/
public static function getArr()
@flxxyz
flxxyz / xdec.php
Last active Jul 10, 2018
自定义多进制很骚
View xdec.php
<?php
/**
* 自定义多进制
* @param $str 自定义的多进制字符串
* @param $num 十进制数字
* @return string
* @author alexander_phper
* @link https://blog.csdn.net/alexander_phper/article/details/51363491
*/
function xdec($str, $num){
@flxxyz
flxxyz / get_safe_filesize.php
Last active Aug 28, 2018
读取大于2GB以上的文件
View get_safe_filesize.php
<?php
function get_safe_filesize($file)
{
$size = filesize($file);
if ($size <= 0) {
if (!(strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')) {
$size = trim(`stat -c%s $file`);
} else {
$fsobj = new COM("Scripting.FileSystemObject");
$f = $fsobj->GetFile($file);
You can’t perform that action at this time.