Skip to content

Instantly share code, notes, and snippets.

@5818959
5818959 / Credit Card Generator
Created July 28, 2022 15:13 — forked from B-Con/Credit Card Generator
This JavaScript function generates random number strings that pass the Luhn checksum, the test that credit card numbers must conform to. It assumes there is an HTML radio input to indicate which company issued the card. This code is from my webpage here: http://bradconte.com/cc_generator.html.
// Copyright (c) 2015, Brad Conte (http://bradconte.com)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
# Simple Laravel 8+ versioning
Based on [this article](https://dev.to/dalelantowork/laravel-8-api-versioning-4e8) that contains outdated information.
We will have endpoints like this:
```
https://site.test/api/v1/hello
https://site.test/api/v2/hello
```
[xdebug]
zend_extension="xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
;xdebug.remote_connect_back = 1
;xdebug.remote_handler = dbgp
@5818959
5818959 / macos_notify.md
Last active August 28, 2020 07:52
MacOS notification from terminal

MacOS notification from terminal

Create notify script:

sudo vi /usr/local/bin/notify

with content:

#!/usr/bin/osascript
@5818959
5818959 / git-create-revisioninfo-hook.sh
Created October 12, 2018 07:00 — forked from ThomDietrich/git-create-revisioninfo-hook.sh
git hook for revision and branch version file
#!/bin/bash
## Automatically generate a file with git branch and revision info
##
## Example:
## [master]v2.0.0-beta-191(a830382)
## Install:
## cp git-create-revisioninfo-hook.sh .git/hooks/post-commit
## cp git-create-revisioninfo-hook.sh .git/hooks/post-checkout
## cp git-create-revisioninfo-hook.sh .git/hooks/post-merge
@5818959
5818959 / Switch_PHP_versions.md
Created September 22, 2018 12:38
Switch PHP versions in Mac OS
@5818959
5818959 / gist:b9f392d75ea2ca0d09cb63bf645bc666
Created August 24, 2017 08:06
Git diff between two commits filtered by files extension
# full diff
git diff <SHA1> <SHA1> -- `find . -name '<pattern>'`
# only file names
git diff <SHA1> <SHA1> --name-status -- `find . -name '<pattern>'`
@5818959
5818959 / multiple_ssh_configs.txt
Created August 11, 2017 08:29
Handle with multiple SSH client configuration files
https://serverfault.com/questions/375525/can-you-have-more-than-one-ssh-config-file
alias compile-ssh-config='echo -n > ~/.ssh/config && cat ~/.ssh/*.config > ~/.ssh/config'
*~
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
[core]
quotepath = false
editor = nano
autocrlf = input
excludesfile = /Users/username/.gitignore_global
[user]
name = username
email = user@email.local
[alias]
ap = add -p