Skip to content

Instantly share code, notes, and snippets.

View medardm's full-sized avatar
😴
zzzZzzzZzzz

Medard Mandane medardm

😴
zzzZzzzZzzz
View GitHub Profile
@medardm
medardm / actions.wasp.ts
Last active April 17, 2025 09:50
Wasp-lang: An example of splitting/organizing main wasp file (OpenSaaS) into different sections
import { QueryConfig, ActionConfig, App, ApiConfig } from "wasp-config"
export const initActions = (app: App) => {
const {
getPaginatedUsersConfig,
updateCurrentUserConfig,
updateUserByIdConfig,
generateGptResponseConfig,
createTaskConfig,
deleteTaskConfig,
@medardm
medardm / contracts...SRKToken.sol
Created January 19, 2024 07:06
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.19+commit.7dd6d404.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
@medardm
medardm / Response.php
Created March 24, 2019 06:39 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@medardm
medardm / php-style-guide.md
Created November 2, 2018 02:18 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts