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/sh | |
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo | |
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo | |
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | |
echo "sslverify=false" >> /etc/yum.conf | |
echo "IPV6_FAILURE_FATAL=no | |
IPV6_ADDR_GEN_MODE=stable-privacy | |
IPV6ADDR=$IPV6ADDR/64 | |
IPV6_DEFAULTGW=$IPV6_DEFAULTGW" >> /etc/sysconfig/network-scripts/ifcfg-eth0 |
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/sh | |
random() { | |
tr </dev/urandom -dc A-Za-z0-9 | head -c5 | |
echo | |
} | |
array=(1 2 3 4 5 6 7 8 9 0 a b c d e f) | |
gen64() { | |
ip64() { | |
echo "${array[$RANDOM % 16]}${array[$RANDOM % 16]}${array[$RANDOM % 16]}${array[$RANDOM % 16]}" |
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 | |
abstract class TextValueBaseConstant | |
{ | |
/** @var array Memorized queried values. */ | |
protected static $caches = []; | |
/** | |
* Get value of text | |
* |
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
.field { | |
@extend .form-group, .row; | |
input[type="text"], | |
select, | |
textarea, | |
input[type="password"] { | |
@extend .form-control; | |
} | |
&.remember { |
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
<script> | |
const resourcesStatus = window.performance.getEntriesByType('resource') | |
.reduce(function(formattedOutput, resourceDetails) { | |
return formattedOutput.concat({ | |
resourceName: resourceDetails.name, | |
cached: resourceDetails.transferSize ? false : true, | |
transferSize: resourceDetails.transferSize | |
})}, []) | |
resourcesStatus.filter(_ => !_.cached) |
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
function seeInDatabaseAndHasProperties($table, array $filter, array $properties, $connection = null){ | |
$this->seeInDatabase($table, $filter, $connection); | |
$model = (array)DB::table($table)->where($filter)->first(); | |
$this->assertEquals($properties, Arr::only($model, array_keys($properties))); | |
} |
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 declare(strict_types=1); | |
$socket = socket_create(AF_INET, SOCK_RAW, SOL_TCP); | |
if (!$socket) { | |
$errorCode = socket_last_error(); | |
throw new \RuntimeException(socket_strerror($errorCode), $errorCode); | |
} | |
const IP_HDR = 'Cversion_ihl/Ctos/ntot_len/nid/nfrag_off/Cttl/Cprotocol/ncheck/Nsaddr/Ndaddr/'; |
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
defmodule OverpunchGmnOkGoodConverter do | |
@overpunch_characters %{ | |
"{" => {"0", ""}, | |
"}" => {"0", "-"}, | |
"A" => {"1", ""}, | |
"B" => {"2", ""}, | |
"C" => {"3", ""}, | |
"D" => {"4", ""}, | |
"E" => {"5", ""}, | |
"F" => {"6", ""}, |
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
<html> | |
<head> | |
<style> | |
.grid{ | |
margin-bottom: 5px; | |
text-align: center; | |
border: 1px solid green; | |
} | |
.xs{ | |
width: 576px; |
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 path = require('path'); | |
const glob = require('glob'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | |
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = (env, options) => { | |
const devMode = options.mode !== 'production'; | |
// với devMode sẽ sử dụng webpack-dev-server để xử dụng các tính năng như HRM |
NewerOlder