Skip to content

Instantly share code, notes, and snippets.

@riking
riking / playground.rs
Last active January 30, 2023 22:05 — forked from rust-play/playground.rs
Code shared from the Rust Playground
pub struct Foo;
fn main() {
recheck();
let f = Foo;
let x = f.quux::<{
impl Foo {
pub fn quux<const N: usize>(&self) -> usize {
N
#include <signal.h>
#include <stdio.h>
#include <malloc.h>
#include <setjmp.h>
#include <stdbool.h>
static jmp_buf omg;
struct list {
char dummy[16384];
@riking
riking / -
Last active August 29, 2015 14:20 — forked from anonymous/-
server {
listen 80;
listen [::]:80;
server_name www.riking.org; # change this lol
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl spdy;
listen [::]:443 ssl spdy;
@riking
riking / a.go
Last active August 29, 2015 14:15 — forked from notblizzard/a.go
package main
var namesMap = map[string]string{"Hello": "World","foo":"bar"}
// u8 xer_so_ov; // format: (SO << 1) | OV
diff --git a/Source/Core/Core/PowerPC/PowerPC.h b/Source/Core/Core/PowerPC/PowerPC.h
index 69eb0da..071582d 100644
--- a/Source/Core/Core/PowerPC/PowerPC.h
+++ b/Source/Core/Core/PowerPC/PowerPC.h
@@ -306,6 +306,20 @@ inline int GetXER_SO()
inline void SetXER_SO(int value)
{
@riking
riking / The Code
Created March 8, 2012 23:57 — forked from anonymous/The Code
Generation Help
public void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int a= 0; a < 32; a++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Ores.Emerald.blockID, 8)).generate(world, rand, randPosX, randPosY, randPosZ);
}