This file contains hidden or 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
#!/usr/bin/env sh | |
host=127.0.0.1:9000 | |
s3_key=testuser | |
s3_secret=testpassword | |
bucket=$1 | |
path="/${bucket}/$2" | |
out_file=$3 | |
date=`date -R` |
This file contains hidden or 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
#!/bin/bash | |
# Usage: ./minio-upload testbucket testfile.txt | |
bucket=$1 | |
file=$2 | |
host=127.0.0.1:9000 | |
s3_key=testuser | |
s3_secret=testpassword |
This file contains hidden or 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
$rawData = '-----------------------------33101021874828258291396904054\x0D\x0AContent-Disposition: form-data; name=\x22_csrf-con\x22\x0D\x0A\x0D\x0AFncEZnF1nO1ZYJvX7PQs-Oq0EWplnGfJ06n5OElzFhJjPzwlEBzMjg5VyaWNmk-6nYBTLDSqEaCdwZNwEV4nQQ==\x0D\x0A-----------------------------33101021874828258291396904054\x0D\x0AContent-Disposition: form-data; name=\x22RegistrationMailForm[username]\x22\x0D\x0A\x0D\x0A\x0D\x0A-----------------------------33101021874828258291396904054\x0D\x0AContent-Disposition: form-data; name=\x22RegistrationMailForm[email]\x22\x0D\x0A\x0D\[email protected]\x0D\x0A-----------------------------33101021874828258291396904054--\x0D\x0A'; | |
$rawData = preg_replace_callback( | |
"(\\\\x([0-9a-f]{2}))i", | |
static function($a) {return chr(hexdec($a[1]));}, | |
$rawData | |
); | |
preg_match('/^(?<boundary>.+)$/m', $rawData, $matches); | |
$parts = explode($matches['boundary'], $rawData); |
This file contains hidden or 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 | |
require $_SERVER['DOCUMENT_ROOT'] . '/app/config/database.php'; | |
use App\User; | |
User::checkLogin(); | |
if ($post) { | |
$acts = [ | |
'create' => [ |
This file contains hidden or 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
image: | |
name: docker/compose:1.22.0 | |
entrypoint: ["/bin/sh", "-c"] | |
variables: | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
CONTAINER_IMAGE: registry.gitlab.com/healthfreaks/healthfreaks | |
COMPOSE_FILE: ${CI_PROJECT_DIR}/docker-compose.yml:${CI_PROJECT_DIR}/docker-compose.ci.yml |
This file contains hidden or 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
Query executed successfully: | |
update `monitorProducts` as m | |
set `prodAssignedManager` = | |
( | |
select `managr` from | |
( | |
select count(*) as counted, | |
m2.`prodAssignedManager` as `managr` | |
from monitorProducts m2 |
This file contains hidden or 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 | |
require_once($_SERVER['DOCUMENT_ROOT'].'/phpexcel/PHPExcel/IOFactory.php'); | |
$phpexcel_filename = $_SERVER['DOCUMENT_ROOT'].'/import.xlsx'; | |
$phpexcel_filetype = PHPExcel_IOFactory::identify($phpexcel_filename); | |
$phpexcel_objReader = PHPExcel_IOFactory::createReader($phpexcel_filetype); | |
$phpexcel_objPHPExcel = $phpexcel_objReader->load($phpexcel_filename); | |
// convert one sheet | |
$phpexcel_sheet = $phpexcel_objPHPExcel->getSheet(0); | |
$phpexcel_highestRow = $phpexcel_sheet->getHighestRow(); |
This file contains hidden or 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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default |
This file contains hidden or 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
# xmodmap is required | |
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' |
This file contains hidden or 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
find $PWD -name "_" -exec awk 'NR%2{f=$1;next;}{c=$0;}{print c > "{}"f;}' {} \; |
NewerOlder