I was experimenting on custom styling the <select>
elements of a form I was building. One of the things I tried implementing was truncating the text with an ellipsis in case it extended beyond the <select>
's width. It didn't look consistent through browsers, but I've accidentally discovered something really nice.
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
composer create-project --prefer-dist laravel/laravel multiauth |
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
yum install -y git git-core zlib zlib-devel gcc-c++ patch readline readline-devel \ | |
libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake \ | |
libtool bison curl sqlite-devel ImageMagick ImageMagick-devel mysql-devel | |
cd ~ | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build |
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
<IfModule mod_headers.c> | |
Header set Connection keep-alive | |
# Cache-control headers | |
# 2 HOURS | |
#<filesMatch "*"> | |
Header set Cache-Control "max-age=7200, must-revalidate" | |
#</filesMatch> | |
# 480 weeks - 290304000 |
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 | |
# Copyright © 2016 Faishal Saiyed | |
cd | |
timestamp=$(date +%s) | |
if [ ! -f openssh-7.3.zip ]; then wget https://github.com/faishal/openssh-portable/releases/download/cent.os.6.7.openssh.7.3p1/openssh-7.3.zip; fi; | |
unzip -o openssh-7.3.zip -d openssh-7.3p1 | |
cd openssh-7.3p1/ | |
cp /etc/pam.d/sshd pam-ssh-conf-$timestamp | |
rpm -U *.rpm | |
yes | cp pam-ssh-conf-$timestamp /etc/pam.d/sshd |
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
I'm writting this gist for anyone who is having problems updating their OVH Public Cloud hostname on CentOS 7 | |
The issue: | |
When ordering a public cloud instance and setting the instance name to sub.domain.tld and then eventually changing that sub | |
the settings don't seem to update on OVH side. | |
It looks like systemd-hostnamed still pulls the original hostname from what i'm guessing is the datastore on OpenStack. (unconfirmed) | |
The solution: |
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 | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
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; | |
/** | |
* 01 - Set the auth config as usual in app/config/auth.php file. | |
* This example uses Eloquent driver... | |
* | |
* 02 - Create a Middleware for each auth context ex: Admin, Customers. | |
* | |
* 03 - Register the Middlewares in app/Http/Kernel.php routeMiddleware array... | |
* |
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 | |
// initialize plugin | |
if ( function_exists( 'add_action' ) && function_exists( 'register_activation_hook' ) ) { | |
add_action( 'plugins_loaded', array( 'tabbed_plugin', 'get_object' ) ); | |
} | |
class tabbed_plugin | |
{ | |
// singleton class variable | |
static private $classobj = NULL; |
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
/cache/ |
NewerOlder