Skip to content

Instantly share code, notes, and snippets.

View xurenlu's full-sized avatar
🎆
holiday

黄滚 xurenlu

🎆
holiday
View GitHub Profile
@xurenlu
xurenlu / get-image-info-fc.py
Created February 28, 2024 06:45
grap image information in fc@aliyun
# -*- coding: utf-8 -*-
import oss2
import json
from wand.image import Image
from wand.drawing import Drawing
from wand.color import Color
import base64
import requests
@xurenlu
xurenlu / dingding.go
Created January 25, 2024 06:18
dingding.go
package main
import (
"bytes"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"encoding/hex"
"encoding/json"
from faster_whisper import WhisperModel
from fastapi import FastAPI
import requests
import os
import time
model_size = "large-v2"
# Run on GPU with FP16
model = WhisperModel(model_size, device="cuda", compute_type="float16")
#!/bin/sh
echo "Subject:php error from q2.glz8.com
" > /tmp/mail_temp
tail -n 10 /var/log/php/php-error.log >> /tmp/mail_temp
sendmail xurenlu@glz8.com < /tmp/mail_temp
var gulp = require("gulp");
var process = require('child_process');
gulp.task('send', function(){
process.exec('/home/x/bin/sendtokaifa',
function (error, stdout, stderr) {
if (error !== null) {
console.log('[send]exec error: ' + error);
}else{
console.log("send finished");
}
/**
* Created by r on 14/12/17.
*/
/* MooTools: the javascript framework. license: MIT-style license. copyright: Copyright (c) 2006-2014 [Valerio Proietti](http://mad4milk.net/).*/
/*
Web Build: http://mootools.net/core/builder/e426a9ae7167c5807b173d5deff673fc
*/
/*
@xurenlu
xurenlu / react-boot-markup.html
Created April 11, 2015 03:47
react-boot-markup example
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<!--<script src="bower_components/requirejs/require.js"></script>-->
<script src="./bower_components/jquery/dist/jquery.js"></script>
<script src="./bower_components/react/react-with-addons.js"></script>
<script src="bower_components/react/JSXTransformer.js"></script>
<script src="bower_components/react-bootstrap/react-bootstrap.js"></script>
@xurenlu
xurenlu / json2html
Created April 8, 2015 13:26
json2html.还差HTML解析模板的支持.todo:加上knockoutjs的后续支持.
var serverOutput =[ {
"tag":"bootpanel",
"children": [
{
"tag": "panel",
"children": [
{
"tag": "button",
"class": ["btn-primary"],
"children": "Submit"
https://github.com/medcl/elasticsearch-analysis-ik/archive/v1.2.6.zip
unzip v1.2.6.zip


sudo -i

cd /usr/share/elasticsearch
cd plugins
bin/plugin -install medcl/elasticsearch-analysis-ik/1.2.6
@xurenlu
xurenlu / bluetooth.sh
Created October 14, 2014 09:56
检测蓝牙是否连,如果未连接,则挂起系统;
#!/bin/bash
while true
locked="false"
do
pair=`bluetoothstatus |grep "renlu" |awk -F ":" '{print $1}'`
if [ "${pair}" != "paired" ] ;then
echo "connected:"
else
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
echo "paired:"