Skip to content

Instantly share code, notes, and snippets.

View miquelbrazil's full-sized avatar

Miquel Brazil miquelbrazil

View GitHub Profile
@cramforce
cramforce / elgato-key-light-smartthings-device-handler.groovy
Last active February 23, 2023 06:20
A SmartThings Device Handler for Elgato Key Light
/**
* Copyright 2020 Malte Ubl
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
@binhp
binhp / Netsuite-AWS-Module-Guide.md
Last active June 3, 2024 03:40
Netsuite AWS Module

AWS Module for Netsuite

AWS.S3

1. Add S3 lib

Upload ns-aws-s3.js to Netsuite Files at /SuiteScripts/lib/ns-aws-s3

File /SuiteScripts/lib/ns-aws-s3

@rs77
rs77 / Ntask_library_ss_2.0.js
Last active February 10, 2020 05:03
Minor edits applied to JSDoc and @enums to get JetBrains to be able to help with autocomplete and type checking
/**
* SuiteScript module
*
* @module N/task
* @NApiVersion 2.x
*
*/
function task() {}
/**
* Creates a task of the given type and returns the task object.
@rs77
rs77 / Nsearch_library_ss_2.0.js
Last active February 9, 2020 23:09
Minor edits applied to the JSDoc tagging of NetSuite's SuiteScript 2.0 version of the `search` library.To be able to have it register and perform proper type and autofilling of functions (etc).
/**
* SuiteScript search module (Client Side)
*
* @module N/search
* @suiteScriptVersion 2.x
*
*/
function search() {}
/**
* Creates a new search. The search can be modified and run as an ad-hoc search, without saving it. Alternatively,
@bericp1
bericp1 / database.php
Created August 28, 2018 22:15
Per-cluster Redis Config For Laravel
<?php
return [
// ...
'redis' => [
'options' => [
// Options can be specified here (with the lowest precedence).
],
@devNoiseConsulting
devNoiseConsulting / gist:fb6195fbd09bfb2c1f81367dd9e727ed
Last active December 9, 2020 05:33 — forked from romainneutron/gist:5340930
Download large files using Guzzle 6.3
<?php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
$url = "https://domain.tld/large-file.mp4";
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$client = new Client(array(
@smuda
smuda / SetupSSHForwardingOnQNAP.md
Created November 19, 2017 04:26
Setup SSH forwarding on QNAP NAS

On receiving NAS:

setcfg LOGIN "SSH AllowTcpForwarding" TRUE
reboot

On client to forward local port 8443 to the QNAP admin interface:

ssh user@host -L 8443:localhost:443
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 17, 2024 18:30
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

@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active June 12, 2024 14:34
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
<?php
/**
* Automatically alias Laravel Model's to their base classname.
* Ex: "App\Models\User" now can just be accessed by "User"
*/
if (! function_exists('aliasModels')) {
function aliasModels() {
$finder = new \Symfony\Component\Finder\Finder();
$finder->files()->name('*.php')->in(base_path().'/app');