Skip to content

Instantly share code, notes, and snippets.

View Dobby233Liu's full-sized avatar

Liu Wenyuan Dobby233Liu

View GitHub Profile
@kylemcdonald
kylemcdonald / oneliner.fs
Created November 12, 2011 14:24
one liner
/*
GLSL fragment shader implementing the one line synthesis pattern.
http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html
*/
#extension GL_EXT_gpu_shader4 : enable
const int width = 512; // assumes you're drawing at 512x512
void main() {
int t = int(gl_FragCoord.y) * width + int(gl_FragCoord.x);
int c = t*5&(t>>7)|t*3&(t*4>>10);// miiro
import java.util.*;
public class Main {
static long[] memo = new long[91];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print(fibo(sc.nextInt()));
}
static long fibo(int n){
if (n<=1) return n;
@fischerbach
fischerbach / README.md
Created January 31, 2020 06:57 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@chicoxyzzy
chicoxyzzy / noncoercible.js
Last active March 15, 2021 17:09
Non-coercible objects
function nonCoercible(val) {
if (val == null) {
throw TypeError('nonCoercible shouldn\'t be called with null or undefined');
}
const res = Object(val);
res[Symbol.toPrimitive] = () => {
throw TypeError('Trying to coerce non-coercible object');
}
return res;
};
# I am ashamed for writing this.
import inspect;
class Cin:
""" time to whip out some python magic """
def __rshift__(self, other):
# I don't want to require that "other" is declared global.
cin = input();
@InvoxiPlayGames
InvoxiPlayGames / lang_en.json
Last active September 24, 2021 15:19
DELTARUNE Chapter 2 English Language JSON file, made by referencing data.win, lang_jp.json and lang_en_ch1.json. Some strings may be missing or inaccurate.
This file has been truncated, but you can view the full file.
{
"date":"1632407807322",
"DEVICE_CHOICE_slash_Create_0_gml_28_0":"NO",
"DEVICE_CHOICE_slash_Create_0_gml_29_0":"YES",
"DEVICE_CHOICE_slash_Create_0_gml_64_0":"GRAINS",
"DEVICE_CHOICE_slash_Create_0_gml_65_0":"MEAT",
"DEVICE_CHOICE_slash_Create_0_gml_66_0":"DAIRY",
"DEVICE_CHOICE_slash_Create_0_gml_67_0":"SWEETS",
"DEVICE_CHOICE_slash_Create_0_gml_68_0":"FRUIT",
@xjohjrdy
xjohjrdy / xiaoxiao_tts.py
Last active April 25, 2023 10:25
返回的音频没有文件头,所以我随便加的一个文件头,但显示的音频时长有问题。如果播放器不能正常播放,可以使用Chrome播放。
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from ws4py.client.threadedclient import WebSocketClient
import binascii
class WSClient(WebSocketClient):
def __init__(self, url, text, filename):
@GoToLoop
GoToLoop / resizeNN.js
Last active June 6, 2023 18:11 — forked from gncgnc/resizeNN.js
Extends p5.Image to handle nearest neighbor resizing for scaling images w/o blurring.
/**
* Resize the image to a new width and height using nearest neighbor algorithm.
* To make the image scale proportionally,
* use 0 as the value for the wide or high parameters.
* For instance, to make the width of an image 150 pixels,
* and change the height using the same proportion, use resize(150, 0).
* Otherwise same usage as the regular resize().
*
* Note: Disproportionate resizing squashes "pixels" from squares to rectangles.
* This works about 10 times slower than the regular resize.
@yangshun
yangshun / youtube-vimeo-url-parser.js
Last active June 14, 2023 22:27
YouTube Vimeo URL Parser
function parseVideo (url) {
// - Supported YouTube URL formats:
// - http://www.youtube.com/watch?v=My2FRPA3Gf8
// - http://youtu.be/My2FRPA3Gf8
// - https://youtube.googleapis.com/v/My2FRPA3Gf8
// - Supported Vimeo URL formats:
// - http://vimeo.com/25451551
// - http://player.vimeo.com/video/25451551
// - Also supports relative URLs:
// - //player.vimeo.com/video/25451551
@brandedoutcast
brandedoutcast / spam-domains
Last active July 1, 2023 02:28
Spam domains that plague my email
jmails.info
sacustomerdelight.co.in
extrobuzzapp.com
ixigo.info
offer4uhub.com
netecart.com
101coupon.in
freedealcode.in
bankmarket.in
hotoffers.co.in