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 | |
$dir = '/var/www/html/'; | |
$files1 = scandir($dir); | |
print_r($files1); | |
?> |
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
/** | |
* Geoblock users by Country code | |
* | |
* The action below blocks the following countries: | |
* - Russia | |
* - Belarus | |
* - Iran | |
* - Cuba | |
* - Syria | |
* - North Korea |
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
#!/usr/bin/env bash | |
if [[ $# -eq 0 ]] | |
then | |
echo "Usage: {up|down|runStages}" | |
exit 0 | |
fi | |
PWD_RESOLVED="$(pwd -P)" |
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 | |
# Full filenames+dirs, 1 per per line in filenames.txt first | |
sed -i "s:.*\/::" filenames.txt |
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
================================== | |
node -v ; npm -v ; yarn -v | |
================================== | |
v10.8.0 | |
6.2.0 | |
bash: yarn: command not found | |
================================== | |
hyperd run -t test /bin/sh |
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
/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */ | |
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.p |
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
// Find all items with "required" class in the form with "form-horizontal" class | |
$(".form-horizontal .required").each(function(i,e){console.log(i+' '+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
#Get Docker | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list | |
aptitude update | |
apt-get install lxc-docker | |
#Get virtual network software | |
apt-get install vde2 | |
#Create new interfaces | |
vde_switch -tap tap0 | |
#Assign new interface IP |
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
jQuery.validator.addMethod("alphanumeric", function(value, element) { | |
return this.optional(element) || /[!^\x00-\x80]+/i.test(value); | |
}, "Letters, numbers, and underscores only please"); |
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 com.atlassian.core.util.DateUtils | |
import com.atlassian.jira.ComponentManager | |
import org.joda.time.DateTime | |
import org.joda.time.DateMidnight | |
import org.joda.time.LocalDate | |
import org.joda.time.format.* | |
timestamp = issue.getCreated() | |
DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.S") |
NewerOlder