Skip to content

Instantly share code, notes, and snippets.

View alexrdz's full-sized avatar
🎥
working

alex rodriguez alexrdz

🎥
working
View GitHub Profile
@alexrdz
alexrdz / form.php
Created October 10, 2022 01:15 — forked from jacmaes/form.php
Processwire: Front-end upload form example using ProcessWire Inputfields #pw
<?php
/**
* Front-end upload form example
* using ProcessWire Inputfields
*/
$sent = false;
$upload_path = $config->paths->assets . "files/.tmp_uploads/";
@alexrdz
alexrdz / fieldgroup.php
Created April 2, 2022 02:39
Processwire Using API to create and manipulate pages, templates, field, users etc..
<?php
$fg = $this->fieldgroups->get('FIELDGROUP_NAME');
// if not, create it
if(empty($fg)) {
$fg = new Fieldgroup();
$fg->name = 'NAME';
$fg->add($this->fields->get('title'));
$fg->add($this->fields->get('FIELD2'));
$fg->add($this->fields->get('FIELD3'));
@alexrdz
alexrdz / webstoemp-gulpfile.js
Created May 17, 2020 01:39 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"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");
@alexrdz
alexrdz / BEMify
Last active September 6, 2016 20:55 — forked from paceaux/BEMify
Stylus BEM mixin
e(name)
&__{name}
{block}
m(name)
&--{name}
{block}
.header
color: red
+e(element)
@alexrdz
alexrdz / gh-pages-deploy.md
Created June 17, 2016 03:20 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@alexrdz
alexrdz / multiple_ssh_setting.md
Last active July 29, 2017 21:02 — forked from RichardBronosky/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"