Skip to content

Instantly share code, notes, and snippets.

View Gasol's full-sized avatar
🥂
Hello strangers ~

Gasol Wu Gasol

🥂
Hello strangers ~
View GitHub Profile
@ali-p-q
ali-p-q / definitions.rb
Created December 31, 2022 13:32
Definitions file for solargraph-rails adding all methods from ActiveModel and Ruby's standard library
# The following comments fill some of the gaps in Solargraph's understanding of
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
# ignored at runtime.
#
# You can put this file anywhere in the project, as long as it gets included in
# the workspace maps. It's recommended that you keep it in a standalone file
# instead of pasting it into an existing one.
#
# @!parse
# class ActionController::Base
@tripurari001
tripurari001 / gist:e78aa7b33a1f9f000405309a8082982a
Created May 4, 2019 16:50
Openwest 2015 - Erik Falor - From Vim Muggle to Wizard in 10 Easy Steps
_
- - /, /, |\ 222222222222222
)/ )/ ) ' _ \\ 2:::::::::::::::22
)__)__) \\ /\\ < \, ,._-_ / \\ _-_, 2::::::222222:::::2
~)__)__) || / /-|| || || || ||_. 2222222 2:::::2
) ) ) || /\\ (( || || || || ~ || 2:::::2
/-_/-_/ \\ || \/\\ \\, \\/ ,-_- 2:::::2 ::::::
/ 2222::::2 ::::::
(, 22222::::::22 ::::::
.--.--.-----. 22::::::::222
@fntsrlike
fntsrlike / ProGit-zh-translation.md
Last active May 26, 2024 08:31
《Pro Git》第二版中文文件翻譯對照表與規範

《Pro Git》第二版中文文件翻譯對照表與規範

由於原本 Pro Git zh-tw 翻譯社群共筆的服務 hackpad 已經停止運作,並被移植到 Dropbox Paper。為了有利於本份資料在社群共享、傳播,故將其從 Dropbox Paper 輸出,並存在 Gist 備存。

相關議題可以參照 progit/progit2-zh-tw#38#39

前言

很慶幸的,有各位熱心的夥伴參與翻譯,其實就算是單人翻譯的狀況,常常會發生有些專有名詞或者是格式上前後不一的狀況。所以開了一個 pad 專門記錄這些規範以及參考的翻譯對照表。有些是我個人的一些想法,如果夥伴們有其他的意見跟想法歡迎提出來討論。 關於專有名詞翻譯的部分,我能理解部分夥伴會覺得就保留英文即可,但我會希望文件也類似於中文翻譯書般,第一次出現時我們可以以 專有名詞中文翻譯 (英文原文)的呈現方式來表示,讓讀者可以產生中英關聯,之後同份文件再次出現將只會出現中文翻譯。這樣做是因為對於初學者來說不會因為滿滿的英文專有名詞而產生抗拒。當然前提是在於中文的翻譯是否能夠達意,這部分建議參考對岸的一些翻譯,有時候比我們Pro Git的還直觀。但對於像 Laravel, Composer 等是名字、指令等就不強求要中文對照,這類不會有統一翻法更不容易從翻譯中知道用意的,就保留英文即可。如果不清楚該怎麼翻才好也可以留著與大家討論。

@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@olih
olih / jq-cheetsheet.md
Last active June 19, 2024 15:34
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@XVilka
XVilka / TrueColour.md
Last active June 10, 2024 17:21
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

1. The texture target needs to be GLES20.GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, e.g. in the glBindTexture calls and glTexParameteri calls.
2. In the fragment shader define a requirement to use the extension:
#extension GL_OES_EGL_image_external : require
3. For the texture sampler used in the fragment shader, use samplerExternalOES instead of sampler2D.
Everything below here is all in the C code, no more Java.
4. In the C code, use glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage) to specify where the data is, instead of using glTexImage2D family of functions.
@nikic
nikic / objects_arrays.md
Last active April 12, 2024 17:05
Post explaining why objects often use less memory than arrays (in PHP)

Why objects (usually) use less memory than arrays in PHP

This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)

The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array part of it away. So how does that work?

The key here is that objects usually have a predefined set of keys, whereas arrays don't:

@Epicyon
Epicyon / naclsharedlib.txt
Created January 2, 2013 20:14
Build shared NaCL (Crypto) on OSX 10.8.2
# Building NaCL shared library on OSX 10.8.2
# Pulled mostly from the NaCL shared library page: http://wiki.ucis.nl/NaCl/Shared
# Download and extract the NaCl sourcecode:
wget -O- http://hyperelliptic.org/nacl/nacl-20110221.tar.bz2 | bunzip2 | tar -xf -
cd nacl-20110221
# Remove some implementations that do not want to be relocatable (it will fall back to another implementation)
rm -r crypto_onetimeauth/poly1305/amd64
# Patch the compiler commands to create relocatable code
# (OS X) be sure to use gnu sed ( brew install gnu-sed ). Apple sed complained incessantly.
gsed -i "s/$/ -fPIC/" okcompilers/c