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() { | |
var map = new google.maps.Map(document.getElementById("map_canvas"), {}); | |
var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687); | |
var googleMapWidth = $("#map_canvas").css('width'); | |
var googleMapHeight = $("#map_canvas").css('height'); | |
map.setCenter(newyork); | |
$('#enter-full-screen').click(function(){ |
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 jira import JIRA | |
import pandas as pd | |
import pdb | |
from collections import defaultdict | |
import datetime | |
import pprint | |
class ImportJiraAnalyticsData: |
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
To do so on terminal: | |
gksu gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla | |
Replace gedit with your favorite editor’s command. This command will open a blank file. Copy and paste these lines: | |
[Enable Hibernate] | |
Identity=unix-user:* | |
Action=org.freedesktop.upower.hibernate | |
ResultActive=yes |
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 | |
/** | |
* Render an exception into an HTTP response. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @param \Exception $exception | |
* @return \Illuminate\Http\Response | |
*/ | |
public function render($request, Exception $exception) | |
{ |
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 moment = require('moment'); | |
const colors = { | |
"green" :"\x1b[32m", | |
"yellow":"\x1b[33m%s\x1b[0m", | |
"red":"\x1b[31m", | |
"cyan":"\x1b[36m", | |
"blue":"\x1b[34m", | |
"default":"" | |
} | |
module.exports = function (message,color="default"){ |
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\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Storage; | |
class SnapshotCommand extends Command | |
{ |
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 | |
Route::group([ | |
'prefix' => 'api/v1', | |
'middleware' => ['api', 'auth:api'] | |
], function () { | |
Route::get('/', function () { | |
return Auth::guard('api')->user(); | |
}); |
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 | |
if [ ! $1 ]; then | |
echo " Example of use: $0 database_name dir_to_store" | |
exit 1 | |
fi | |
db=$1 | |
out_dir=$2 | |
if [ ! $out_dir ]; then | |
out_dir="./" |
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
<snippet> | |
<content><![CDATA[ | |
public function ${1:relationship}() | |
{ | |
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table}); | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>belt</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
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\Commands\Database; | |
use Illuminate\Support\ServiceProvider; | |
class BindDatabaseServiceProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ |