Skip to content

Instantly share code, notes, and snippets.

@renowncoder
renowncoder / gulpfile.js
Created October 6, 2021 15:35 — forked from dyarfi/gulpfile.js
Gulp 4 gulpfile.js config
const { src, dest, parallel, series, watch } = require('gulp');
// const pug = require('gulp-pug'); // Pug default view template
const twig = require('gulp-twig');
const sass = require('gulp-sass');
const prefix = require('gulp-autoprefixer');
const data = require('gulp-data');
//const minifyCSS = require('gulp-csso');
const sourcemaps = require('gulp-sourcemaps');
const concat = require('gulp-concat');
const plumber = require('gulp-plumber');
@renowncoder
renowncoder / yzc_disable_bp_confirmation_email.php
Created October 4, 2021 22:18 — forked from KaineLabs/yzc_disable_bp_confirmation_email.php
Disable buddypress confirmation e-mail only admins can approve accounts
<?php
/**
* Disable Confimation Messages and E-mail.
**/
function yzc_disable_bp_confirmation_email() {
return false;
}
add_filter( 'bp_registration_needs_activation', 'yzc_disable_bp_confirmation_email' );
The goal of Node was event driven HTTP servers.
5:04 https://youtu.be/M3BM9TB-8yA?t=304
1 Regret: Not sticking with Promises.
* I added promises to Node in June 2009 but foolishly removed them in February 2010.
* Promises are the necessary abstraction for async/await.
* It's possible unified usage of promises in Node would have sped the delivery of the eventual standartization and async/await.
* Today Node's many async APIs are aging baldly due to this.
6:02 https://youtu.be/M3BM9TB-8yA?t=362
@renowncoder
renowncoder / bynary-tree.js
Created October 1, 2021 13:06 — forked from gustavonecore/bynary-tree.js
Binary Search Tree in Node
const DIREECTION = {
LEFT: 'LEFT',
RIGHT: 'RIGHT',
};
class Node {
constructor(data, parent = null) {
this.data = data;
this.parent = parent;
this.level = parent ? (parent.level + 1) : 1;
function xmas() {
var b = document.getElementsByTagName('body')[0];
var c = document.createElement('canvas');
var ctx = c.getContext('2d');
var flakes, flakeNumber = 250, gravity = 1, w, h, timer;
c.style.cursor = 'pointer';
c.style.zIndex = '999999';
c.style.top = 0;
c.style.left = 0;
<?php
/**
* for code completion
*
* @link http://docs.php.net/manual/en/book.gearman.php
*/
if (false) {
define('GEARMAN_SUCCESS', 0);
@renowncoder
renowncoder / gearman-code-completion.php
Created October 1, 2021 10:59 — forked from nojimage/gearman-code-completion.php
pecl gearman classes code completion for NetBeans
<?php
/**
* for code completion
*
* @link http://docs.php.net/manual/en/book.gearman.php
*/
if (false) {
define('GEARMAN_SUCCESS', 0);
@renowncoder
renowncoder / .gitignore
Created September 28, 2021 18:17 — forked from Yousha/.gitignore
.gitignore for PHP developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@renowncoder
renowncoder / cookies.js
Created September 28, 2021 01:33 — forked from kitwalker12/cookies.js
Set cookies based on referral links
// init namespace
window.app = {};
window.app.custom = {};
(function ($, app) {
var $window = $(window);
app.captureCampaign = {
parameters: ['campaign_source'],
cookiePersistDays: 30,