$name = @$_POST['name'];
# => null or the value for name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
from flask import Flask, Response | |
from ultralytics import YOLO | |
app = Flask(__name__) | |
model2 = YOLO("models/yolov8n-face.pt") | |
cam = cv2.VideoCapture(0) | |
if not cam.isOpened(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" pathogen | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
" colors | |
set t_Co=256 | |
colorscheme desert256v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get bash completion for brew | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# git prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// minimal routing | |
function web_app($routes, $req_verb, $req_path) { | |
$req_verb = strtoupper($req_verb); | |
$req_path = trim(parse_url($req_path, PHP_URL_PATH), '/'); | |
$found = false; | |
if (isset($routes[$req_verb])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* procedural wrappers for web request/response variables | |
* | |
* @author Jesus A. Domingo <jesus.domingo@gmail.com> | |
* @license MIT | |
*/ | |
/** | |
* Gets a request parameter (from $_GET over $_POST combination) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function detach(fn, cls) { | |
if (typeof cls.prototype[fn] !== 'function') { | |
throw new Error(fn + ' is not an instance function'); | |
} | |
return cls.prototype[fn].call.bind(cls.prototype[fn]); | |
} | |
var slice = detach('slice', Array); | |
var map = detach('map', Array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<!-- mac management --> | |
<item> | |
<name>Set Command_L + Esc to Window Switch</name> | |
<identifier>private.cmd_l_esc_to_window_switch</identifier> | |
<autogen> | |
__KeyToKey__ | |
KeyCode::ESCAPE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" pathogen | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
" colors | |
set t_Co=256 | |
colorscheme Monokai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# behaviour | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set -g visual-activity on | |
set -g default-terminal "screen-256color" | |
setw -g monitor-activity on | |
# ctrl-a instead of ctrl-b | |
# set-option -g prefix C-a |
NewerOlder