Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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?") |
This file contains hidden or 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
var qs = (function(a) { | |
if (a == "") return {}; | |
var b = {}; | |
for (var i = 0; i < a.length; ++i) | |
{ | |
var p=a[i].split('=', 2); | |
if (p.length == 1) | |
b[p[0]] = ""; | |
else | |
b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); |
This file contains hidden or 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
// | |
// AppStoryboards.swift | |
// AppStoryboards | |
// | |
// Created by Gurdeep on 15/12/16. | |
// Copyright © 2016 Gurdeep. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains hidden or 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
@GET("/v1/categories") | |
void getMessages(Callback<BaseResponse<CategoriesResponse>> callback); |
This file contains hidden or 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
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache |
This file contains hidden or 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 - |