Skip to content

Instantly share code, notes, and snippets.

View ilmsg's full-sized avatar
😍
love me love my bug

Eak Netpanya ilmsg

😍
love me love my bug
View GitHub Profile
@oliworx
oliworx / HANA-tenant-db.sql
Created April 21, 2017 22:31
How to create and dropa SAP HANA tenant database
-- source: https://blogs.sap.com/2016/10/27/create-tenant-database-sap-hana-express-sap-hana-academy/
-- create a tenant
CREATE DATABASE TESTDB SYSTEM USER PASSWORD Initial1;
-- add the script server service
ALTER DATABASE TESTDB ADD 'scriptserver'
-- or hit two birds with one stone
CREATE DATABASE TESTDB ADD 'scriptserver' SYSTEM USER PASSWORD Initial1;
-- Tenants by default start automatically, but can be started and stopped manually as well
@jcavat
jcavat / Dockerfile
Last active April 15, 2025 17:40
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@SRJ9
SRJ9 / error_x86_64_gnu_gcc_fix.sh
Last active September 19, 2020 16:39
Fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
#!/bin/bash
# https://github.com/scrapy/scrapy/issues/2115
sudo apt-get install python3 python-dev python3-dev \
build-essential libssl-dev libffi-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
python-pip
@kanaka
kanaka / addTwo.wast
Last active March 8, 2025 01:56
Run wast (WebAssembly) in node
(module
(func $addTwo (param i32 i32) (result i32)
(i32.add
(get_local 0)
(get_local 1)))
(export "addTwo" (func $addTwo)))
@nilsmagnus
nilsmagnus / kafka_consumer.go
Created February 15, 2017 08:04
Example of go consuming from kafka, using the shopify/sarama library
package main
import (
"fmt"
"github.com/Shopify/sarama"
"os"
"os/signal"
"strings"
)
@tops
tops / add.php
Created February 13, 2017 20:34
Simple React Demo - Todo-list
<?php
$db = mysqli_connect("localhost","root","root","todo");
mysqli_query($db,"SET NAMES utf8");
$query = "INSERT INTO items (title) VALUES ('{$_GET['title']}')";
$result = mysqli_query($db, $query);
echo json_encode(["id" => mysqli_insert_id($db), "title" => $_GET['title']]);
@AshikNesin
AshikNesin / react-file-upload.js
Created February 2, 2017 06:46
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}
@maheshmurthy
maheshmurthy / Voting.sol
Last active June 6, 2023 21:20
Simple solidity contract to vote for a candidate and see the results
pragma solidity ^0.6.4;
// We have to specify what version of compiler this code will compile with
contract Voting {
/* mapping field below is equivalent to an associative array or hash.
The key of the mapping is candidate name stored as type bytes32 and value is
an unsigned integer to store the vote count
*/
mapping (bytes32 => uint256) public votesReceived;
@jesuino
jesuino / Relogio.java
Created January 10, 2017 21:17
Um simples Relógio com JavaFX
package org.fxapps.genetics;
import java.text.SimpleDateFormat;
import java.util.Date;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
@cohenadair
cohenadair / node-setup.md
Last active October 15, 2023 12:19
How to quickly setup a Node.js REST API with Express, Mocha, and supertest.

tl;dr

  1. Download and install Node.js
  2. Download and extract the Sample Project
  3. In a Terminal window, navigate to the extracted folder
  4. Run npm install
  5. Run the app

Introduction

This guide is meant to be a very quick setup for a Node.js REST API. It will include links to each component if you'd like to read more.

Note that I use macOS, so the commands may be slightly different on a non-Unix machine.