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 | |
## Colors for cli output messages | |
ERROR=`tput setaf 1` | |
SUCCESS=`tput setaf 2` | |
PC=`tput setaf 3` | |
NC=`tput sgr0` | |
## Available choices on args | |
## You can create as many project as you like for choices |
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 | |
# Add Ruby2.0 respository | |
add-apt-repository -y ppa:brightbox/ruby-ng-experimental | |
# Add PHP 7.* ppa | |
sudo add-apt-repository ppa:ondrej/php | |
# Add node source respository | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - |
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
RewriteEngine on | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |
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
const getDuration = file => { | |
return new Promise((resolve, reject) => { | |
let videoElement = document.createElement("video"); | |
videoElement.preload = "metadata"; | |
videoElement.onloadedmetadata = function() { | |
window.URL.revokeObjectURL(videoElement.src); | |
resolve(videoElement.duration); | |
}; |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1489770487230", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn user" | |
}, | |
"Action": [ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
const download = blob => { | |
if (window.navigator.msSaveOrOpenBlob) { // IE hack; see http://msdn.microsoft.com/en-us/library/ie/hh779016.aspx | |
window.navigator.msSaveBlob(blob, "filename.csv"); | |
} else { | |
let a = window.document.createElement("a"); | |
a.href = window.URL.createObjectURL(blob, {type: "text/plain"}); | |
a.download = "filename.csv"; | |
document.body.appendChild(a); | |
a.click(); // IE: "Access is denied"; see: https://connect.microsoft.com/IE/feedback/details/797361/ie-10-treats-blob-url-as-cross-origin-and-denies-access | |
document.body.removeChild(a); |
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
// https://script.google.com/macros/s/AKfycbxqaARMsIrSYKysoN5RByYe0PlWAgW9VrRi16p8IojhFKpgYpc/exec | |
function doGet(e){ | |
//return handleResponse(e); | |
} | |
function doPost(e){ | |
return handleResponse(e); | |
} |
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\Http\Middleware; | |
use Closure; | |
use Illuminate\Config\Repository as Config; | |
class TenantDetector { | |
protected $config; | |
public function __construct(Config $config) |
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 random | |
def main(): | |
# Generate digits | |
code = generate_digits(3, []) | |
print(code) | |
# Some story | |
print("Welcome to CodeBreaker Game, You need to unlock something before something happened") | |
print("Can you guess the code to unlock that something?") |