Skip to content

Instantly share code, notes, and snippets.

View andy0130tw's full-sized avatar
🍌
why no 🍆

Andy Pan andy0130tw

🍌
why no 🍆
View GitHub Profile
@jankais3r
jankais3r / Ghost_custom_excerpt_tag.md
Created July 29, 2015 21:49
Ghost - custom excerpt tag

This code snippet implements manual control over excerpts in Ghost.

You will need to modify 2 files and 1 setting:

  1. Ghost/core/server/helpers/content.js - this one will get overwritten during Ghost update
  2. Ghost/content/themes//partials/loop.hbs - this one has to be modified for each theme
  3. 'Blog Footer' section of 'Code Injection' settings page

Default behavior is having whole articles displayed on the front page. If you want to display only an excerpt, put `` at the position you want to cut the article.

-- programming
data Nat : Set where
zero : Nat
suc : Nat → Nat
_+_ : Nat → Nat → Nat
zero + n = n
suc m + n = suc (m + n)
#include <stdio.h>
#include <string.h>
#ifdef ofst
for i in range(12):
MID, ofst, _ = 12, lambda o, i: int(o[i], 16), """
#else
#define ofst(o, i) 0
int main () { int t; char *s, *_; for (int i = 0; i < 12; i++) {
s = " """;
t = (int)(9+(i%3+(int)(i/3))*2-(i>8)*(2*(i-8)+2)) + ofst("466975754C32", i);
@jjgod
jjgod / 0001-Fix-CID-keyed-fonts-glyph-lookup.patch
Last active March 3, 2019 11:25
Patch to dvipdfm-x for CID-keyed font support
From 759df18a9c8ec05c6830687682c57d9e4c6a55d3 Mon Sep 17 00:00:00 2001
From: Jiang Jiang <gzjjgod@gmail.com>
Date: Sat, 26 Jul 2014 21:33:19 +0200
Subject: [PATCH 1/3] Fix CID-keyed fonts glyph lookup
Keep cff_charsets parsed from CID font around if exists. Use the
cff_charsets to do GID -> CID lookup.
---
texk/dvipdfm-x/cff.c | 14 ++++++++------
texk/dvipdfm-x/cff.h | 1 +
@cowboy
cowboy / jquery.ba-deparam.js
Created June 14, 2011 20:39
jQuery Deparam -- WORK IN PROGRESS -- NOT DONE YET
// jQuery Deparam - v0.1.0 - 6/14/2011
// http://benalman.com/
// Copyright (c) 2011 Ben Alman; Licensed MIT, GPL
(function($) {
// Creating an internal undef value is safer than using undefined, in case it
// was ever overwritten.
var undef;
// A handy reference.
var decode = decodeURIComponent;

譯: Recca、黃雅信

CREDIT

GitLab 的六個價值是合作(Collaboration),結果(Results),效率(Efficiency),多元(Diversity),迭代(Iteration)和透明(Transparency)。這六個字拼成 CREDIT 作為我們送給各位的禮物。這些價值觀是相互關聯的,彼此之間互相合作以保護我們公司的文化。下面逐一解釋這些價值觀的操作方式:

合作

即使對目標沒有立即性的幫助,幫助別人應該是首要項目。相同的,你可以依靠別人的協助與意見 - 事實上你也應該要這樣。 每個人,包含不在 gitlab 公司工作的人,都可以對任何專案提意見。對專案負責的人決定專案要怎麼做,但是他應該要認真看待其他人的意見,並解釋為什麼之前有或者沒有這麼做。

@mujjingun
mujjingun / PCP.cpp
Last active April 29, 2020 14:50
Undecidable C++ Grammar Example
#include <algorithm>
#include <type_traits>
template <int... Ints>
struct Row {
constexpr static bool empty = (sizeof...(Ints) == 0);
};
template <typename Upper, typename Lower>
struct Domino {

Intrinsically-typed de Bruijn representation of simply typed lambda calculus

open import Data.Nat
open import Data.Empty
  hiding (⊥-elim)
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
-- This exercise covers the first 6 chapters of "Learn You a Haskell for Great Good!"
-- Chapter 1 - http://learnyouahaskell.com/introduction
-- Chapter 2 - http://learnyouahaskell.com/starting-out
-- Chapter 3 - http://learnyouahaskell.com/types-and-typeclasses
-- Chapter 4 - http://learnyouahaskell.com/syntax-in-functions
-- Chapter 5 - http://learnyouahaskell.com/recursion
-- Chapter 6 - http://learnyouahaskell.com/higher-order-functions
-- Download this file and then type ":l Chapter-1-6.hs" in GHCi to load this exercise
@rfikki
rfikki / rinkeby-peers-latest.txt
Last active December 9, 2020 04:21
Updated DEC/08/2020 - IMPORTANT RUN THE LATEST RELEASE OF THE CLIENT - https://geth.ethereum.org/downloads/
admin.addPeer("enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303");
admin.addPeer("enode://3338fd63203ca8f079c79c3fc5bcdaa9ee8ad8f64a48ddfb0022b77f623768eb08e82576fc1c8356a0f588ad9162989704d16e9fc0e6f0bd9feb8f7e80ed1b5f@5.189.149.113:35555");