Skip to content

Instantly share code, notes, and snippets.

View basselin's full-sized avatar
😎

Benoit Asselin basselin

😎
View GitHub Profile

Describe the network protection controls used by your organization to restrict public access to databases, file servers, and desktop/developer endpoints.

  • Access to the Amazon Aurora database through the network is disabled and standard ports are closed. The database is only accessible through a socket on the server itself.
  • The reverse proxy only serves whitelisted directories that are only from sources controlled by Teecom used (AWS Amplify).
  • API endpoints are password protected (PBKDF2 & SHA512 encryption, salted, and stretched for thousands of rounds).
  • Login credentials are always transmitted securely over SSL.

Describe how your organization individually identifies employees who have access to Amazon Information, and restricts employee access to Amazon information on a need- to-know basis.

  • If all your employees are properly assigned separate users and given only relevant access rights: Access rights are provided to employees based on their role within the company and are progressive, base
@basselin
basselin / lock-screen
Created December 1, 2021 18:58
macOS - Lock screen (zsh)
#!/bin/zsh
pmset displaysleepnow
@basselin
basselin / git-HEAD.sh
Last active September 28, 2020 19:08
git symbolic-ref HEAD
git branch -m main
git push origin main
git branch -r
# warning: ignoring broken ref refs/remotes/origin/HEAD
# origin/main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
git branch -r
@basselin
basselin / Promise.js
Created June 18, 2019 08:09
Promise.js
(async () => {
let promise1 = new Promise((resolve, eject) => {
resolve('YES');
});
promise1.then( r => console.log(r) ); // YES
console.log(await promise1); // YES
@basselin
basselin / escapeSelector.js
Last active October 29, 2020 23:43
escapeSelector.js
// https://code.jquery.com/jquery-3.3.1.js
var escapeSelector = function(sel) { // $.escapeSelector()
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g;
var fcssescape = function(ch, asCodePoint) {
if (asCodePoint) {
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
if (ch === "\0") {
return "\uFFFD";
}
// Control characters and (dependent upon position) numbers get escaped as code points
@basselin
basselin / iframe-responsive.html
Last active January 22, 2018 17:54
iframe responsive with Bootstrap 3.3.7
<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" width="500" height="300" src="https://www.youtube.com/embed/tVgMTBEwhT8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" width="500" height="300" src="https://www.youtube.com/embed/tVgMTBEwhT8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
@basselin
basselin / package.json
Last active December 14, 2017 09:11
package.json outdated version (with Yarn)
{
"dependencies": {
"placeholders.js": "~3.0.2",
"placeholders.js": "git+ssh://git@github.com:jamesallardice/Placeholders.js.git#~4.0.1",
}
}
@basselin
basselin / run.sh
Last active March 25, 2018 18:36
Disable OS X Gatekeeper
sudo spctl --master-disable
# “App” is damaged and can’t be opened. You should move it to the Trash.
xattr -rc /Applications/MyApp.app
@basselin
basselin / index.html
Last active June 26, 2017 12:14
[data-include="page.html"]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>[data-include=&quot;page.html&quot;]</title>
<style>
* { font-family: sans-serif; }
[data-include] {
margin: 1em 0em;
padding: 0em 1em;
@basselin
basselin / search.md
Last active November 2, 2017 17:50
PhpStorm multi line search (Find + Find/Replace) Raw

PhpStorm

word1[.\s\S]*word2

TextMate

word1(?m:.+)word2