Skip to content

Instantly share code, notes, and snippets.

View xymox12's full-sized avatar

euanjfc xymox12

View GitHub Profile
/*
Based on Neil Kolban example for IDF:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleWrite.cpp
Ported to Arduino ESP32 by Evandro Copercini
*/
// Modificado por Juan Antonio Villalpando.
// http://kio4.com/arduino/160i_Wemos_ESP32_BLE.htm
// https://community.appinventor.mit.edu/t/ble-esp32-bluetooth-send-receive-arduino-ide/1980/3
// https://github.com/michaelruck/ESP32_phone_camera_remote_shutter
@xymox12
xymox12 / crawler.sh
Last active March 2, 2021 13:05
Convert a csv of URLs and Page Titles created using WGET to Freemind XML and UL list
#!/bin/bash
#
# Crawls a domain
# Retreives all visible URLs and their page titles
# Saves to CSV
# $1 = URL (no http(s))
# $2 = csv title
# MODIFY - wget include directories, domain, and --reject-regex TODO - make a variable
# Text color variables
==> drupalvm: Running provisioner: ansible_local...
drupalvm: Running ansible-playbook...
PLAY [all] *********************************************************************
TASK [setup] *******************************************************************
ok: [drupalvm]
TASK [Define config_dir.] ******************************************************
skipping: [drupalvm]
@xymox12
xymox12 / README.md
Last active October 5, 2018 07:49
DrupalVM hosted on Windows with Samba and without Shared Folders

DrupalVM hosted on Windows without Shared Folders but with Samba access to Ubuntu

First off - thanks to DrupalVM's author Jeff Geerling for creating DrupalVM:

The configuration below turns off the shared web folder so that the file structure is maintained within the guest filesystem. Samba is then setup to allow access to the Linux guest to help improve integration with Windows tools such as editors etc. In the example below Drupal has to be installed manually (or with your own scripts) but you can use the usual methods to automate Drupal installation (See DrupalVM documentation).

  1. Copy the config.yml into your drupalvm folder
  2. Create a folder 'scripts' in the root of the drupalvm folder
@xymox12
xymox12 / mymodule.module
Created December 2, 2015 15:52
Drupal Field Handler
<?php
// Drupal does it the 'offical' sql way which can be a pain when you just want to do it the mysql way
// This is the workaround
// Tags are set in the view display Query setting
function mymodule_query_alter(QueryAlterableInterface $query) {
$view_name = 'project_isotope';
if ($query->hasTag('views_' . $view_name)) {
$query->groupBy('node.title');
}
}
[www]
path = /var/www
force user = root
force group = root
directory mask = 0755
create mask = 0644
writable = yes
available = yes
browseable = yes
guest ok = yes
@xymox12
xymox12 / samba-notes
Last active August 29, 2015 14:16
VB Ubuntu Linux
# SAMBA
Install SAMBA
## Memory leak warning
* "no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory"
If you get the memory leak error warning:
'You can also fix this issue while keeping libpam-smbpass installed by running "pam-auth-update" and remove "SMB password synchronization". Got that solution from Thomas (reusch) on https://bugs.launchpad.net/ubuntu/+s...a/+bug/1257186 '
@xymox12
xymox12 / Example-ConEmu-Task--Composer
Last active August 29, 2015 14:09
ConEmu Setup for Composer, Drush, Etc
PROMPT=$E[92m$P$E[90m$G$E[m$S & SET PATH=%PATH%;%ConEmuDir%\php54;%ConEmuDir%\mysql5540\bin;%ConEmuDir%\GnuWin32\bin & cmd /k doskey composer=php %ConEmuDir%\composer\composer.phar $* & cmd -cur_console:t:"Composer"
@xymox12
xymox12 / test1
Created June 4, 2014 23:02
Scout
java -jar vendor/jruby-complete.jar -S gem install -i vendor/gems --no-rdoc --no-ri bundler
set GEM_HOME=vendor/gems
set GEM_PATH=vendor/gems
java -jar vendor/jruby-complete.jar -S gem list
java -jar vendor/jruby-complete.jar -S gem install compass
java -jar vendor/jruby-complete.jar -S bundle install --path=vendor/bundle --binstubs
@xymox12
xymox12 / fix
Created March 19, 2014 21:55
Patch for Worpress Pages Children plugin 1.5.2.1 issue with taxonomy pages
Ref: http://wordpress.org/plugins/pages-children/
With the plugin v1.5.2.1 I get an error 'unsupported operand types class-wp-list-table.php on line 144'
To fix correct the missing $ in front of the arg variable on line 390 of pages-children.php :
return arg;
should be