Skip to content

Instantly share code, notes, and snippets.

View ingride's full-sized avatar
🤓
eternally curious

ingrid epure ingride

🤓
eternally curious
View GitHub Profile
@ingride
ingride / gist:7bb61483127d1f6d85a35d772b589090
Last active May 24, 2023 17:44
Return a String from C++ to WASM
// C++ bit . save it in an example.cpp file
#include "emscripten.h"
extern "C" {
inline const char* cstr(const std::string& message) {
char * cstr = new char [message.length()+1];
std::strcpy (cstr, message.c_str());
return cstr;
}
EMSCRIPTEN_KEEPALIVE
const char* getAMessage() {

Keybase proof

I hereby claim:

  • I am ingride on github.
  • I am ingride (https://keybase.io/ingride) on keybase.
  • I have a public key ASBouDaMwZ6fCh5tLhUL-CcUFupNc4UwD31fG6q7XeMbuQo

To claim this, I am signing this object:

[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @storybook/react@3.4.11" has unmet peer dependency "babel-runtime@>=6.0.0".
warning " > downshift@1.31.16" has unmet peer dependency "prop-types@>=15".
warning "firebase > @firebase/database@0.3.6" has unmet peer dependency "@firebase/app-types@0.x".
warning "firebase > @firebase/firestore@0.8.6" has unmet peer dependency "@firebase/app-types@0.x".
warning "firebase > @firebase/functions@0.3.1" has unmet peer dependency "@firebase/app-types@0.x".
warning "firebase > @firebase/messaging@0.3.6" has unmet peer dependency "@firebase/app-types@0.x".
fn main() {
let s = String::from("hello"); // s comes into scope
takes_ownership(s);
println!("same s {}", s); // nope!
}
fn takes_ownership(some_string: String) { // some_string comes into scope
@ingride
ingride / cookie.html
Created May 2, 2017 12:27
math-href-weirdness
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out default.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key default.key -out default.csr
echo "Removing passphrase from key (for nginx)..."
cp default.key default.key.org
openssl rsa -in default.key.org -out default.key