Skip to content

Instantly share code, notes, and snippets.

View uvexz's full-sized avatar
💤
Sleeping

UVEXZ uvexz

💤
Sleeping
View GitHub Profile
@uvexz
uvexz / pick.py
Last active August 7, 2024 13:27
Mastodon Comment Lottery Program
import random
from mastodon import Mastodon
# Mastodon API 设置
mastodon = Mastodon(
access_token = 'YOUR_ACCESS_TOKEN',
api_base_url = 'https://mastodon.social'
)
def get_post_comments(post_id):
@uvexz
uvexz / lanterns.min.js
Created February 1, 2024 03:38
春节灯笼
"use strict";document.addEventListener("DOMContentLoaded",function(i){var d=document.createElement("div");d.innerHTML='<div class="deng-box2"><div class="deng"><div class="xian"></div><div class="deng-a"><div class="deng-b"><div class="deng-t">年</div></div></div><div class="shui shui-a"><div class="shui-c"></div><div class="shui-b"></div></div></div></div><div class="deng-box3"><div class="deng"><div class="xian"></div><div class="deng-a"><div class="deng-b"><div class="deng-t">新</div></div></div><div class="shui shui-a"><div class="shui-c"></div><div class="shui-b"></div></div></div></div><div class="deng-box1"><div class="deng"><div class="xian"></div><div class="deng-a"><div class="deng-b"><div class="deng-t">乐</div></div></div><div class="shui shui-a"><div class="shui-c"></div><div class="shui-b"></div></div></div></div><div class="deng-box"><div class="deng"><div class="xian"></div><div class="deng-a"><div class="deng-b"><div class="deng-t">快</div></div></div><div class="shui shui-a"><div class="shui-c">
@uvexz
uvexz / nginx.conf
Created June 15, 2017 01:36 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

Keybase proof

I hereby claim:

  • I am ygbhf on github.
  • I am yjk (https://keybase.io/yjk) on keybase.
  • I have a public key whose fingerprint is ECE4 41EE E469 0142 2CD2 CBD7 BDD7 8FA7 0BB1 2E23

To claim this, I am signing this object:

#ds-thread #ds-reset .ds-meta,.ds-powered-by,.ds-toolbar-buttons,.ds-post-likes,.ds-post-repost,.ds-post-report,.ds-icon-reply{
display: none!important;
}
#ds-reset .ds-gradient-bg,#ds-thread #ds-reset .ds-textarea-wrapper{
background:none!important;
}
#ds-thread #ds-reset .ds-post-options {
border:none!important;
border-top: 1px solid #ddd!important;
margin-right: 0!important;

Chill the lion

WebGL experiment using ThreeJS. Move the fan and press to make wind, the lion will surely appreciate.

A Pen by Karim Maaloul on CodePen.

License.

# API-1-ChinaNetCenter (Avg RTT: 8.7361ms)
se.itunes.apple.com = 116.55.236.54
su.itunes.apple.com = 116.55.236.54
upp.itunes.apple.com = 116.55.236.54
play.itunes.apple.com = 116.55.236.54
client-api.itunes.apple.com = 116.55.236.54
# API-2-ChinaCache (Avg RTT: 5.95355ms)
itunes.apple.com = 182.247.232.20
init.itunes.apple.com = 182.247.232.20
# API-HK-Akamai-1 (Avg RTT: 49.3258421053ms)
!function(e,t,s){function a(){return c.short_name?g+"//"+c.short_name+"."+S.DOMAIN:S.REMOTE}function i(){function t(){for(var t;t=y.shift();){var a=t.url,i=new s(t.title,{dir:"auto",icon:t.iconUrl,body:t.body});try{i.onclick=function(){e.focus(),h.href=a,i.close()}}catch(r){}setTimeout(function(){i.close&&i.close()},8e3)}}var s=e.Notification;"Notification"in e&&"denied"!==s.permission&&("granted"===s.permission&&t(),s.requestPermission(function(e){"granted"===e&&t()}))}function r(){return 0==nt.data.user_id}function n(e){S.theme=e,"none"!=e&&o.injectStylesheet(S.STATIC_URL+"/styles/embed"+(e?"."+e+".css?"+A[e]:"."+short_name)+".css")}var o={},d=t.getElementsByTagName("head")[0]||t.getElementsByTagName("body")[0];if(o.extend=function(e,t){for(var s in t)e[s]=t[s];return e},o.injectScript=function(a,i){var r=t.createElement("script"),n=t.head||t.getElementsByTagName("head")[0]||t.documentElement;r.type="text/javascript",r.src=a,r.async="async",r.charset="utf-8",i&&(r.onload=r.onreadystatechange=function(t,a){v
@uvexz
uvexz / The wriggle sphere.markdown
Created March 27, 2016 07:51
The wriggle sphere

The wriggle sphere

Three.jsで提供される標準Geometryの座標を操作するデモ。
座標の更新をグラフィックに反映させるには、以下のメソッドとプロパティが必要。

mesh.geometry.computeVertexNormals();
mesh.geometry.computeFaceNormals();
mesh.geometry.verticesNeedUpdate = true;
mesh.geometry.elementsNeedUpdate = true;
mesh.geometry.normalsNeedUpdate = true;