Skip to content

Instantly share code, notes, and snippets.

View cameri's full-sized avatar
∞/21M

Ricardo Arturo Cabral Mejía cameri

∞/21M
View GitHub Profile
@cameri
cameri / pb.sh
Created September 4, 2013 18:38
#!/bin/bash
PUSH_URL="https://www.pushbullet.com/api/pushes"
function pb_pushnote {
/usr/bin/curl "${PUSH_URL}" \
-u "$1:" \
-d "device_id=$2" \
-d "type=note" \
-d "title=$3" \
<?php
/*
* Validates a custom Datetime
* @param mixed check
* @param string
* @return boolean
*/
public function customDatetime($check, $format)
{
foreach ($check as $field=>$value)
<?php
// Pass settings in
$this->Auth->authenticate = array(
'Form' => array('userModel' => 'Usuario')
);
<?php
/**
* User registration
*
* @param int Step
* @return void
*/
public function register($step = 1)
{
$first = 1;
<?php
echo $this->Form->input(
'SelectedLanguage',
array(
'type' => 'hidden',
'div' => false,
'onchange' => 'this.form.submit()',
'options' => Configure::read('Localization.languageAliases'),
'default' => Configure::read('Config.language')
<!doctype html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.min.js"></script>
<script src="userctrl.js"></script>
<script src="https://apis.google.com/js/client.js?onload=init"></script>
</head>
<body>
<div ng-controller="UserCtrl">
@cameri
cameri / file.rb
Created June 13, 2014 04:51
Android created Gist
[Unit]
Description=Hourly Timer Target
StopWhenUnneeded=yes
<?php
App::uses('Component', 'Controller');
class CodeComponent extends Component {
private $letters = array(
'6','M','Z','J','L',
'K','2','H','R','W',
'5','U','3','S','Y',
'X','4','7','C','A',
@cameri
cameri / .xbindkeysrc
Last active August 29, 2015 14:04 — forked from anonymous/.xbindkeysrc
# Play/Pause
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
XF86AudioPlay
# Next
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
XF86AudioNext
# Previous
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
log:
enabledPlugin: '%TAG%N%name%&a&k + %N%version% is now Enabled. Made by %A%autors%%N.'
disabledPlugin: '%TAG%N%name%&c&k - %N%version% is now Disabled. Made by %A%autors%%N.'
help:
info: '%NDisplays the plugin''s info.'
help: '%NShows a list of commands.'
reload: '%NReloads all configs.'
join: '%NJoins a BlockHunt game.'
leave: '%NLeave a BlockHunt game.'
list: '%NShows a list of available arenas.'