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
ssh-keygen -y -f private_key1.pem > public_key1.pub |
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
if("undefined" === typeof document.currentScript){ | |
(function(){ | |
/***************************************************************************/ | |
/* document.currentScript polyfill + improvements */ | |
/***************************************************************************/ | |
var scripts = document.getElementsByTagName('script'); | |
document._currentScript = document.currentScript; | |
// return script object based off of src | |
var getScriptFromURL = function(url) { |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: IBController | |
# Short-Description: starts instance of IBController | |
# Description: starts instance of IBController using start-stop-daemon | |
### END INIT INFO | |
############### EDIT ME ################## | |
# ini file |
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 | |
/* | |
HHVMinfo - phpinfo page for HHVM HipHop Virtual Machine | |
Author: _ck_ | |
License: WTFPL, free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
Version: 0.0.6 | |
* revision history | |
0.0.6 2014-08-02 display fix for empty vs zero | |
0.0.5 2014-07-31 try to determine config file from process command line (may not always work), style improvements |
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
aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-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
#!/bin/bash | |
mkdir wordpress-site && cd wordpress-site | |
touch docker-compose.yml | |
cat > docker-compose.yml <<EOL | |
version: "2" | |
services: | |
my-wpdb: |
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
#!/bin/bash | |
set -euo pipefail | |
# go get github.com/junegunn/fzf | |
BEFORE=10 | |
AFTER=10 | |
HEIGHT=$(expr $BEFORE + $AFTER + 3 ) # 2 lines for the preview box and 1 extra line fore the match | |
PREVIEW="$@ 2>&1 | grep --color=always -B${BEFORE} -A${AFTER} -F -- {}" |
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
//A quick way to generate valid URL to GET files hosted on private AWS S3 bucket | |
//I didn't want to use an SKD so I followed the documentation to make my own and learn | |
//The code is dirty, but since I couln't find anything online, | |
//I figured this could be handy to someone | |
//Requirements : Node and Crypto-js (install with npm install crypto-js) | |
//Remote settings----------------------------------------------------------- |
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
<template> | |
<div :id="uppyId"> | |
<div class="ThumbnailContainer" v-if="collection === 'thumbnail'"> | |
<button id="open-thumbnail-modal" class="button">Select file</button> | |
</div> | |
<div class="DashboardContainer" v-else></div> | |
</div> | |
</template> |
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
import { AbilityBuilder, Ability } from 'casl' | |
// Alternatively this data can be retrieved from server | |
export default function defineAbilitiesFor(user) { | |
const { rules, can } = AbilityBuilder.extract() | |
can('read', 'User') | |
can('update', 'User', { id: user.id }) | |
if (user.role === 'doctor') { |
OlderNewer