Skip to content

Instantly share code, notes, and snippets.

All Systems Operational

Linda_pp rhysd

All Systems Operational
Block or report user

Report or block rhysd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View foo.ll
; ModuleID = 'foo.c'
source_filename = "foo.c"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.12.0"
; Function Attrs: noinline nounwind ssp uwtable
define i32 @main() #0 {
%1 = alloca i32, align 4
%2 = alloca i32, align 4
store i32 0, i32* %1, align 4
@rhysd
rhysd / pre-push
Created Dec 1, 2018
pre-push check script in .git/hooks for Go project
View pre-push
#!/bin/bash
# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
@rhysd
rhysd / cmd
Created Aug 11, 2018
setjmp/longjmp test
View cmd
emcc main.c --js-library main.js -o hello.html -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']"
View vim.wast
This file has been truncated, but you can view the full file.
(module
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$iiiiiiii (func (param i32 i32 i32 i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$i (func (result i32)))
View git-pull-pr.bash
#! /bin/bash
set -e
if [[ "$1" == "" ]]; then
echo "Usage: git pull-pr {PR number}" 1>&2
exit 1
fi
git fetch origin "pull/$1/head:pr-$1"
View bench.rb
#!/usr/bin/env ruby
require 'benchmark'
puts Benchmark.measure {
s = ""
5000000.times do
s << "hey, hey, "
end
}
View reverse.go
package main
func main() {
arr := []int{5, 4, 3, 2, 1}
l := len(arr)
for i, e := range arr[:l/2] {
j := l - 1 - i
arr[i] = arr[j]
arr[j] = e
}
View http-status-code.d.ts
type CONTINUE = 100;
type SWITCHING_PROTOCOLS = 101;
type OK = 200;
type CREATED = 201;
type ACCEPTED = 202;
type NON_AUTHORITATIVE_INFORMATION = 203;
type NO_CONTENT = 204;
type RESET_CONTENT = 205;
type PARTIAL_CONTENT = 206;
type MULTIPLE_CHOICES = 300;
View index.html
<!DOCTYPE html>
<html>
<body>
Hello, world.
</body>
</html>
View index.html
<!DOCTYPE html>
<html>
<body>
<a href="https://github.com" rel="noopener" target="_blank">link</a>
</body>
</html>
You can’t perform that action at this time.