Skip to content

Instantly share code, notes, and snippets.

View valstu's full-sized avatar

Valtteri Karesto valstu

View GitHub Profile
...
<div id="main-content left">
<div class="container">
<div class="twelve columns content">
<h3>Sivupalkki oikealla</h3>
...
@valstu
valstu / gist:2343321
Created April 9, 2012 13:16
Sidebar on the left
...
<div id="main" class="sidebar-left">
<div class="container">
<div class="twelve columns main-content">
...
<!-- SIDEBAR Starts -->
<aside class="four columns">
<div class="panel">
<h5>Tiedotteet</h5>
<ul>
<li class="news-item">
<small>06.04.2012</small>
<h6><a href="#">Pääsiäisen aukioloajat ovat muuttuneet</a></h6>
</li>
<li class="news-item">

Keybase proof

I hereby claim:

  • I am valstu on github.
  • I am valstu (https://keybase.io/valstu) on keybase.
  • I have a public key whose fingerprint is C86B 2FC5 AECF F05C E4C2 DF74 88FF 052C CBDB 0423

To claim this, I am signing this object:

@valstu
valstu / deploy.js
Created April 5, 2020 12:01
Deploy script to publish react app to s3
const AWS = require('aws-sdk');
const fs = require('fs');
const glob = require('glob');
const mimeTypes = require('mime-types');
require('dotenv').config();
AWS.config = new AWS.Config({
credentials: new AWS.Credentials({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
@valstu
valstu / main.yaml
Created April 5, 2020 12:02
Github Actions yaml
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
steps:
import { parseCookies, setCookie } from 'nookies';
import { v4 as uuidv4 } from 'uuid';
import { ThemeProvider, CSSReset } from "@chakra-ui/core";
import Head from 'next/head';
import { withUrqlClient } from 'next-urql';
import Layout from '../components/Layout';
import theme from "../theme";
import '../styles.css';
title slug
Hello, world!
hello-world

Hello, world!

This is some sample content

List of items

title slug
Some Other!
some-other

Some other!

I wonder if this works:

const hello:string = 'world';
@valstu
valstu / webassembly-studio.md
Last active October 14, 2021 07:40
How webassembly.studio compiles C to WASM

How webassembly.studio compiles C code to WASM

https://webassembly.studio is an online IDE where you can develop Webassembly projects with C and compile them to wasm and run them.

Compile to wasm

They don't actually compile it on the browser, what they do is they take code from editor and send it to API endpoint with some options which in turn returns the compiled wasm. Below is the examples of the request:

HTTP POST to https://webassembly-studio-clang.herokuapp.com/build with following payload: