Skip to content

Instantly share code, notes, and snippets.

View SeedyROM's full-sized avatar
🚂
Coding Time

Zack Kollar SeedyROM

🚂
Coding Time
View GitHub Profile
@gingerBill
gingerBill / microui_sdl_demo.odin
Last active April 18, 2024 18:55
microui + SDL Demo in Odin
package microui_sdl
import "core:fmt"
import "core:c/libc"
import SDL "vendor:sdl2"
import mu "vendor:microui"
state := struct {
mu_ctx: mu.Context,
log_buf: [1<<16]byte,
#include <iostream>
#include <variant>
#include <vector>
// Forward Declaration
struct Node;
// Simple
using Int = int;
using String = std::string;
@SeedyROM
SeedyROM / query-params.js
Last active May 13, 2019 08:37
Functional helper to build query parameters for GET requests.
const buildQueryParams = (params) => (
Object
.keys(params)
.reduce((q, k) => q + `${k}=${params[k]}&`, '?')
.slice(0, -1)
);
// Usage:
const queryParams = buildQueryParams({
hello: 'world',
@acosonic
acosonic / attack_urls.txt
Last active November 16, 2021 13:29
Comprehensive list of attack/probe URL's
#This was done by some tool, don't know which one, and our custom built app captured theese URL's, after filtering
#for unique URL's, here is list of URL's in original form, I will later try to create some protection
/3B1728A10D221805D2CABE58B095D353.php
/manager/html
/wp-content/plugins/portable-phpmyadmin/wp-pma-mod/index.php
/mysql/mysqlmanager/index.php
/mysql/sqlmanager/index.php
/mysql/dbadmin/index.php
/mysql/admin/index.php
/phpmy/index.php
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 9, 2024 19:42
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@krstffr
krstffr / debounced-redux-thunk-action.js
Created December 16, 2016 12:04
Debouncing redux thunk actions.
// A common redux pattern when dealing with async functions is to use thunk.
// This usually means your action returns a new function instead of an action object,
// and the thunk middleware will make it all work. Example:
const asyncAction = () => dispatch => setTimeout(() => dispatch(someOtherAction()), 10000);
// Now: maybe that async stuff going on is calling some API which you don't want to overload
// with request, and that's what debounce is for.
// This is an example of a debounced function which will only be calleable once every second.
import { debounce } from 'lodash';
const debouncedFn = debounce(() => callApi(), 1000, { leading: true, trailing: false });
@joshuaboshi
joshuaboshi / gist:5362900
Created April 11, 2013 12:13
Python PLY: Yacc definition for IF/ELSE-IF/ELSE nesting
def p_block_if_statement(t):
'''block_if_statement : RULE_OPEN IF data RULE_CLOSE statements else_blocks'''
t[0] = _AstNode(Interpreter.r_if, t[3], t[5], t[6])
def p_else_if_blocks(t):
'''else_blocks : else_if_block
| else_block
| RULE_OPEN END RULE_CLOSE'''
t[0] = t[1]