Skip to content

Instantly share code, notes, and snippets.

View yukixz's full-sized avatar
❤️
Your Sponsor

Dazzy Ding yukixz

❤️
Your Sponsor
View GitHub Profile
@yukixz
yukixz / summary-20150411.txt
Created April 11, 2015 10:34
twitter following summary 20150411
118648611 : Twitter Web Client 108 | Foursquare 57 | Twitter for Android 27 | Instagram 5
2429801180 : Fenix for Android 184 | IFTTT 4 | Falcon Pro Material 4 | Foursquare 4
101454434 : Twitter Web Client 15
16051594 : Tweetbot for iΟS 66 | Twitter Web Client 60 | Twitterrific 36 | Twitter for iPad 28
83778594 : Twitter Web Client 140 | Twitter for Android 56 | 奶瓶腿 2 | blockcn(5) 1
2958176099 : Twitter for Android 24 | Twitter Web Client 5
69778259 : Twitter Web Client 132 | Twidere for Android #3 63 | OS X 3 | TweetDeck 2
2548323386 : Twitter for Android 120 | Twitter for Mac 36 | Twitter Web Client 32 | Nike Test App 4
102849465 : Twitter Web Client 123 | Talon (Plus) 44 | Plume for Android 9 | IFTTT 8
1459601214 : Twitter for iPad 118 |
@yukixz
yukixz / bilibili.php
Last active August 29, 2015 14:17
Fix bilibili on linux
<?php
error_reporting(E_ALL);
if (!($_SERVER['HTTP_HOST'] === "interface.bilibili.com")) {
return;
}
# curl init
$request_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$ch = curl_init($request_uri);
@yukixz
yukixz / fonts.conf
Last active August 29, 2015 14:04
My fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.fonts</dir>
<match target="pattern">
<test name="family"><string>sans-serif</string></test>
<edit name="family" binding="strong" mode="prepend">
<string>Droid Sans</string>
<string>Source Han Sans CN</string>
@yukixz
yukixz / i6-2.c
Created May 27, 2014 06:54
《计算机算法设计与分析》电子工业出版社·第4版 算法实现题 6-2
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ML 1024
typedef struct node {
int n; // current edge (has put into)
int w; // current weight.
int flag[ML]; // whether V[i] is used.
struct node *next;
@yukixz
yukixz / a3-3.c
Created April 15, 2014 07:33
《计算机算法设计与分析》电子工业出版社·第4版 算法分析题 3-3
#include <stdio.h>
#include <stdlib.h>
static const int B = 10; // Bag volume
static const int N = 5; // Item number
static const int A[] = {1, 2, 3, 4, 5}; // Item weight
static const int C[] = {3, 3, 3, 3, 3}; // Item value
static void knapsack_r(int *m, int *x) {
// Use variable from global.
@yukixz
yukixz / a3-1.c
Created April 14, 2014 15:43
《计算机算法设计与分析》电子工业出版社·第4版 算法分析题 3-1
#include <stdlib.h>
#include <stdio.h>
struct IntArray {
int *array;
int length;
};
void IntArray_init(struct IntArray *a, const int max_length) {
a->array = malloc(max_length * sizeof(int));
% deadbeef
starting deadbeef 0.5.6
server_start
loading plugins from /home/ks/.local/lib/deadbeef
loading plugins from /usr/lib/deadbeef
plug_load_all: scandir found 163 files
loading plugin /usr/lib/deadbeef/aac.so
loading plugin /usr/lib/deadbeef/adplug.so
loading plugin /usr/lib/deadbeef/alac.so
loading plugin /usr/lib/deadbeef/alsa.so
// ==UserScript==
// @name 修改 Bangumi 绿标
// @description 修改当日放送为绿标、去除默认绿标
// @namespace http://dazzyd.org/
// @version 0.2
// @include http://bangumi.tv/
// @include http://bgm.tv/
// @include http://chii.in/
// @run-at document-end
// ==/UserScript==
@yukixz
yukixz / tv.bilibili.player.xml
Last active December 20, 2015 04:29
Bilibili mute list. Please enable regexp mode.
<?xml version="1.0" encoding="UTF-8"?>
<filters>
<!-- Railgun -->
<item enabled="true">t=(.+)\1{5,}</item>
<item enabled="true">t=[^\n\r]{65,}</item>
<item enabled="true">t=[,.?!、,?!]{4,}</item>
<item enabled="true">t=^[0-9.:/\- 年月日]+$</item>
<item enabled="true">t=^\d+\/\d+</item>
<item enabled="true">t=^\d+00</item>
<item enabled="true">t=^[第前][0-9一二两三四五六七八九十百千]+</item>
#include <stdio.h>
#include <stdbool.h>
#define MAXINST 65536 // max instructions
#define AXISLEN 0x1FFFF
bool axis[AXISLEN]; // 2 * 0x10000 - 1
void actU(int left, int right) {
// S ← S ∪ T