Skip to content

Instantly share code, notes, and snippets.

View xurizaemon's full-sized avatar
🌻
SPRING

Chris Burgess xurizaemon

🌻
SPRING
View GitHub Profile
@salathe
salathe / results.txt
Created January 24, 2012 20:55
PHP array/string functions haystack/needle ordering
Array functions:
array_search $needle, $haystack
in_array $needle, $haystack
String functions:
strchr $haystack, $needle
stripos $haystack, $needle
stristr $haystack, $needle
strpos $haystack, $needle
strrchr $haystack, $needle
@1stvamp
1stvamp / mac-curl-ca-bundle.sh
Created March 22, 2012 12:50
Script to install cURL CA certificates on OS X without macports
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@kentbrew
kentbrew / goog_app_specific_passwords.txt
Created April 10, 2012 17:25
Setting Up Application-Specific Passwords in Google Accounts
Just set up 2-factor authorizations for your Google login? Facing puzzling error
messages? Follow this simple set of 24 steps, each and every time one of your apps
fails to sign in:
1: Bring up iCal and feast your eyes upon the following horribly vague error message:
**iCal can't log in to your "Google" account because your password may be incorrect.
The password may have been entered incorrectly. Reenter the password for account
“Google” on the CalDAV server "calendar.google.com."**
@xurizaemon
xurizaemon / drupal-uid1-login.php
Created August 25, 2012 20:56
Authenticate as Drupal UID=1
if ($_GET['x'] == 'SECRET') {
global $user;
$user = user_load(1);
drupal_session_regenerate();
drupal_set_message('Authenticated.');
drupal_goto('admin');
}
@jmervine
jmervine / nginx.conf
Last active March 19, 2020 06:17
Nginx config to test regex.
# Usage:
#
# Start with:
#
# sudo /use/local/sbin/nginx -c /path/to/this/nginx.conf
#
# Tail logs:
#
# $ sudo tail -f /tmp/access.log /tmp/error.log /tmp/match.log
#
@msubel
msubel / uuid_v4_excel_formula.txt
Created July 14, 2015 12:37
An Excel Fromula to generate a UUID v4
=LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;4));4);"-";"4";DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(8;11));DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);DEC2HEX(RANDBETWEEN(0;POWER(16;4));4)))
@xurizaemon
xurizaemon / what-is-logging.md
Last active May 15, 2019 20:55
What does the word logging mean in CiviCRM?

It's not uncommon to hear people mention "logging" or "logs" in relation to CiviCRM. There are some different usages of "log":

  • There's CiviCRM's debug log files in sites/default/files/civicrm/CiviCRM.HASHHASH.log (what)
  • There's the DB table log civicrm_system_log (has an API, only used for IPN data, see CRM_Utils_SystemLogger and forum post).
  • There's Data Logging configured at civicrm/admin/setting/misc (mysql logging via triggers). AKA Change Log or Trigger Logging or Detailed Logging.
  • There's "userFrameworkLogging", which means "dump errors to the CMS logging" (may be Drupal specific)
  • There's the Activity Log, which is the view of activities over ti
@xurizaemon
xurizaemon / support-request-civicrm-pm.md
Last active May 20, 2021 04:55
no email / private support

Hi _____,

Thanks for getting in touch, it’s nice to talk with CiviCRM developers around the world. I hope this effort brings good results for you!

I enjoy contributing to community support through public channels available - Github, CiviCRM chat, Stack Exchange and other similar avenues.

If I am providing support, I want to know it's available to the community. In contrast, to preserve focus I make a distinction between these public forums and direct personal communication. Essentially it’s this: my email (and other private comms) is for personal discussions, and paid work.

By asking a question in the CiviCRM community channel, you’ll be demonstrating an ability to participate in the wider CiviCRM community, and to ask for help when needed. Please try to use the existing community resources for these requests.