Smaller than UUID and copy-paste friendly.
JIN5gNQEwht8999c4xZx9
88AFNNkR1RJI1gs8BBwxV
c54wMAUAR4wkFs9dN9Jts
Inspired by Nano ID
Smaller than UUID and copy-paste friendly.
JIN5gNQEwht8999c4xZx9
88AFNNkR1RJI1gs8BBwxV
c54wMAUAR4wkFs9dN9Jts
Inspired by Nano ID
const { Telegraf } = require('telegraf') | |
const bot = new Telegraf('TOKEN') | |
// Create an object to store the user's information | |
const userData = {} | |
// Set up a command to start the conversation with the user | |
bot.command('start', ctx => { | |
// Define the userData object for the current user | |
userData[ctx.from.id] = {} |
#!/usr/bin/gawk -f | |
BEGIN { | |
FS = "," | |
PROCINFO["sorted_in"] = "@val_num_desc" | |
} | |
{ | |
if ($2 != "") { | |
most_requests[$2]++ |
#!/bin/sh | |
# Sublime Text 3 install with Package Control (last update: 25 September 2016) | |
# | |
# No need to download this script, just run it on your terminal: | |
# | |
# $ curl -L git.io/sublimetext | sh | |
# Detect the architecture |
This trait will allow you to get defined relationships on the model. I wish Laravel have a way to get this without any additions(except for trait), but there is no way.
Here we have 2 versions of the trait: for PHP7 and for PHP5.
Both method uses Reflections to collect information about the model.
With PHP7 version you'll only need to add return class for the relationship method like this:
var $tabLinks = $('a[data-toggle="tab"]'); | |
if($tabLinks.length) { | |
var lastTab = localStorage.getItem('lastTab'); | |
$tabLinks.on('click', function (e) { | |
//save the latest tab; use cookies if you like 'em better: | |
localStorage.setItem('lastTab', $(e.target).attr('href')); | |
}); | |
//go to the latest tab, if it exists: | |
var $target = lastTab ? $('a[href="' + lastTab + '"]') : $tabLinks.first(); | |
$target.tab('show'); |