Skip to content

Instantly share code, notes, and snippets.

@miguel-serrano
miguel-serrano / README.md
Created January 30, 2019 14:35 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@miguel-serrano
miguel-serrano / README.md
Created January 30, 2019 14:34 — forked from hofmannsven/README.md
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.

Source: https://apple.stackexchange.com/a/83923

/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@miguel-serrano
miguel-serrano / mymodule.js
Created August 5, 2017 15:00 — forked from SebCorbin/mymodule.js
Using highcharts with Drupal 7
(function ($) {
Drupal.behaviors.mymodule_charts = {
attach:function () {
if (Drupal.settings.mymodule.charts) {
for (var chart in Drupal.settings.mymodule.charts) {
new Highcharts.Chart(Drupal.settings.mymodule.charts[chart]);
}
}
}
};
@miguel-serrano
miguel-serrano / demo.module
Created December 1, 2015 10:27 — forked from pascalduez/demo.module
Drupal 7 — Basic Ajax form submit (Ajax framework)
<?php
/**
* @file
* Demo module, Basic Ajax form submit (Ajax framework).
*/
/**
* Implements hook_menu().
*/
@miguel-serrano
miguel-serrano / Beanstalk PHP deployment hooks
Created October 18, 2015 18:37 — forked from leonbarrett/Beanstalk PHP deployment hooks
Two CodeIgniter methods that you can use to get your Beanstalk deploy notifications into Notify.io
function pre(){
$this->load->library('notifyio_api');
$handle = fopen('php://input','r');
$jsonInput = fgets($handle);
$decoded = json_decode($jsonInput,true);
fclose($handle);
$data = array(
'email'=>$decoded['author_email'],
@miguel-serrano
miguel-serrano / wget-exit-codes.txt
Created October 18, 2015 10:55 — forked from cosimo/wget-exit-codes.txt
wget exit codes
This is the list of exit codes for wget:
0 No problems occurred
1 Generic error code
2 Parse error — for instance, when parsing command-line options, the .wgetrc or .netrc…
3 File I/O error
4 Network failure
5 SSL verification failure
6 Username/password authentication failure
7 Protocol errors