Skip to content

Instantly share code, notes, and snippets.

View syuilo's full-sized avatar
🥺

syuilo syuilo

🥺
  • Earth
  • 15:00 (UTC +09:00)
View GitHub Profile

How To - Upload and add Images to markdown files in Gist

Markdown files allow embedding images in it. However it requires the image to be hosted at some location and we can add the url of the image to embed it.

Example: ![Alternate image text](https://someurl/imagelocation/image.png)

We can use services like imgur or other services to host the images and use the hosted URL.

@atartanian
atartanian / curvify_points.py
Created April 23, 2017 06:57
blender script to connect all the points of a mesh object into a line
import bpy, bmesh
def main(context):
bpy.ops.object.mode_set(mode='EDIT')
active_obj = bpy.context.active_object
me = active_obj.data
bm = bmesh.from_edit_mesh(me)
verts = bm.verts
@okapies
okapies / mastodon-ostatus.md
Last active September 5, 2021 11:39
Mastodon OStatus API の叩き方

Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。

host-meta

Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta というパスを要求すると以下の XML が返ってくる.

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>
@biogeo
biogeo / indentation.pegjs
Created March 23, 2017 17:55
"Offside rule" indentation parsing with PEG.js
// Parse a document using "offside rule" indentation (as in Python) into lines
// grouped by indentation level, using PEG.js.
// Attempts to segregate the "stateful" rules from the other production/parsing
// rules by "disallowing" indentation-level-sensitive rules from consuming any
// text.
{ var margin_stack = [""]; }
Document
= content: Element+
@xreiju
xreiju / Contents.swift
Last active July 13, 2020 11:59
オタクの過激発言の再現を可能にするコードです。
//: Playground - noun: a place where people can play
let クチャクチャ = 0
let 早口 = 0
let アディダスの財布 = 0
let ドヤ顔 = 0
let ギトギトの髪 = 0
let 運動靴 = 0
let 細い目 = 0
let 汚いメガネ = 0
@othyn
othyn / factorio_headless_guide.md
Last active April 13, 2025 18:46
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.

The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now). The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.

Just a note to newcomers: If there are any issues with the installation steps, people in the comments are doing a good job

@otofune
otofune / config-template.yml
Last active July 23, 2016 02:08
misskey-core's config-template
# Misskey API Configuration
### サーバーの管理者情報
# ex) "Your Name <[email protected]>"
maintainer: <string>
### APIアクセス時のパスワード
apiPass: <string>
### アクセスするときのドメイン
@otofune
otofune / README.md
Last active January 24, 2017 08:31
Misskey Config Sample

Misskey 設定ファイル サンプル集

情報

これらのファイルはそれぞれのsrc/config.tsを参考にしている。
WebについてはTravis Ciでビルドが通った最後のコミットDisplay title時を参考にしている。
現在は以降のコミットによりWebのjsonの書式が変更になっているので注意。
またWebのみビルド時に設定ファイルが存在しないとビルドできない。

必須環境

node、mongoDB、redis、graphicsmagickが動作する環境であれば問題がない
確認が取れているのはArchLinux、Ubuntu 16.04

@twolfson
twolfson / README.md
Last active August 1, 2023 10:45
Node.js job queue evaluation

We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:

@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter