Skip to content

Instantly share code, notes, and snippets.

@nfxpnk
nfxpnk / empty-folder.php
Created January 16, 2022 17:05 — forked from vielhuber/empty-folder.php
script to find empty folders (recursively) and place an empty file in it #php
<?php
function EmptySubFolders($path) {
$empty = true;
foreach(glob($path.DIRECTORY_SEPARATOR."*") as $file) {
if (is_dir($file)) {
if (!EmptySubFolders($file)) {
$empty = false;
}
}
else {
@nfxpnk
nfxpnk / webstoemp-gulpfile.js
Created December 12, 2018 18:12 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
#!/usr/bin/perl
use MIME::Lite;
use DBI;
use GD::Graph::lines;
use Data::Dumper;
use POSIX qw(strftime);
use Date::Parse;
$ENV{'ORACLE_HOME'} = "/opt/oracle/db11g";
$ENV{'LD_LIBRARY_PATH'} = "/opt/oracle/db11g/lib/";
// ReflectionToStringBuilder wraps a class and outputs a string describing
// its attributes, more or less similar to var_dump in PHP
import org.apache.commons.lang.builder.ReflectionToStringBuilder
variable= new ComplexObject()
println new ReflectionToStringBuilder( variable).toString()
$(document).ready(function(){
$('.offer').eq(0).addClass('active');
var link = $('.offer_link a')
link.on('click', function(e){
var panel = $(this).closest('.offer');