function chunkArrayInGroups(arr, size) {
let divisor = Math.floor(arr.length/size);
let lastElem = divisor*size;
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
" automatically leave insert mode after 'updatetime' milliseconds of inaction | |
" au CursorHoldI * stopinsert | |
" set 'updatetime' to 15 seconds when in insert mode | |
" au InsertEnter * let updaterestore=&updatetime | set updatetime=5000 | |
" au InsertLeave * let &updatetime=updaterestore | |
" when you have error about dos line ending (clue here is ^M) | |
" most likely your file has line ending with dos | |
" to check the file type :set ff? |
# ----------------------------------------------------------
# Header - (type): Brief description
# ----------------------------------------------------------
# * feat A new feature
# * fix A bug fix
# * docs Changes to documentation only
# * style Style/format changes (whitespace, etc.)
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 | |
namespace App; | |
use Illuminate\Support\Collection; | |
use Illuminate\Database\Eloquent\Builder; | |
class CursorPaginate | |
{ | |
// (new CursorPaginate())->loadMacro(); //AppServiceProvider boot method |
You can see the reason listed here -> source
TLDR; generate service account key file without transporting the private key.
gcloud iam service-accounts create look-no-keys
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
-module(ring). | |
-export([start/0]). | |
% start/0 top function to run. | |
% c(ring). | |
% ring:start(). | |
start() -> | |
% trace who (process) called the func (mod:func) |
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
data = | |
""" | |
forward 5 | |
down 5 | |
forward 8 | |
up 3 | |
down 8 | |
forward 2 | |
""" |
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
defmodule SchemaChecker do | |
def find_field_discrepancies do | |
schema_modules() | |
|> Enum.map(fn mod -> | |
{mod.__schema__(:source), check_module(mod)} | |
end) | |
end | |
defp schema_modules do | |
{:ok, modules} = :application.get_key(:core, :modules) |
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 | |
ini_set('display_errors', 0); | |
include('includes/config.php'); | |
include('includes/helpers/locale.php'); | |
include('includes/helpers/integrations/zapier/triggers/functions.php'); | |
include('includes/helpers/integrations/rules.php'); | |
include('includes/helpers/subscription.php'); | |
include('includes/helpers/EmailAddressValidator.php'); | |
//--------------------------------------------------------------// |
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
[ | |
{ | |
"context": "Pane", | |
"bindings": { | |
"cmd-1": ["pane::ActivateItem", 0], | |
"cmd-2": ["pane::ActivateItem", 1], | |
"cmd-3": ["pane::ActivateItem", 2], | |
"cmd-4": ["pane::ActivateItem", 3], | |
"cmd-5": ["pane::ActivateItem", 4], | |
"cmd-6": ["pane::ActivateItem", 5], |
OlderNewer