This Gist includes some of the common AWS/IAM policy examples to give granular access to users.
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
using System; | |
using System.Linq; | |
using System.Management; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace DeviceID | |
{ | |
internal class Fingerprint | |
{ |
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
FROM alpine:3 | |
RUN apk update && apk upgrade | |
RUN apk add --no-cache chromium chromium-chromedriver | |
RUN mkdir -p /usr/src/app \ | |
&& adduser -D chromium \ | |
&& chown -R chromium:chromium /usr/src/app |
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
function getCsrfToken() { | |
var parts = ('; ' + document.cookie) | |
.split("; csrf="); | |
if (parts.length === 2) { | |
const value = parts.pop().split(";").shift(); | |
return decodeURIComponent(value); | |
} | |
} | |
function sendXhr(url, method, data = null, headers = {}) { |
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 | |
/** | |
* @param string|null $number | |
* @return string|null | |
*/ | |
function normalize_to_e164(?string $number): ?string | |
{ | |
if (empty($number)) { | |
return null; |
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
FROM ubuntu | |
WORKDIR /meilisearch | |
RUN apt-get update && \ | |
apt-get install -y libc6-dev wget | |
RUN wget -O exe https://github.com/meilisearch/MeiliSearch/releases/download/v0.12.0/meilisearch-linux-armv8 && \ | |
chmod a+x exe |
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 | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Str; | |
trait HasUuidAsPrimaryKey | |
{ | |
public static function bootHasUuidAsPrimaryKey() | |
{ | |
static::creating(function (Model $model) { |
Setting up notifications for successful SSH logins to Slack on a Linux server is pretty easy. Before everything, please make sure to create a Slack app (if not already), add a Webhook and keep its URL handy.
To get started, login to your instance as root (or as a sudoer user) and run below commands:
# create a directory in /opt
sudo mkdir -p /opt/ssh2slack
# paste the contents from file included and save it with Ctrl+O and Ctrl+X
sudo nano /opt/ssh2slack/slack_message.json
First get Docker installed and setup on machine. Once installed, create a new user e.g., metabase
for your installation using following command:
sudo adduser metabase
Now add the newly created user to docker
group, you won't need sudo
for docker ...
commands:
sudo usermod -aG docker metabase
NewerOlder