Skip to content

Instantly share code, notes, and snippets.

View dv336699's full-sized avatar
😬
I may be slow to respond.

Diego dv336699

😬
I may be slow to respond.
View GitHub Profile
<?php //FILE: sms_api.php
function sendSMS($number,$message,$concat = 1) {
$url = "example"; // Set your frontlinesms or frontlinecloud webconnection url here
$secret = "secret"; // Set the secret here
$request = array(
'secret' => $secret,
'message' => $message,
'recipients' => array(array(
@dv336699
dv336699 / gist:84398a3a559c65b1bc52
Last active February 20, 2016 16:07
viewport resizer including most used phones
javascript:void((function(d)%7Bif(self!%3Dtop%7C%7Cd.getElementById(%27toolbar%27)%26%26d.getElementById(%27toolbar%27).getAttribute(%27data-resizer%27))return false%3Bd.write(%27<!DOCTYPE HTML><html style%3D"opacity:0%3B"><head><meta charset%3D"utf-8"></head><body><a data-viewport%3D"320x480" data-icon%3D"mobile" data-version%3D"320" title%3D"Mobile (e.g. Apple iPhone 4, iPod)">Mobile (e.g. Apple iPhone 4, iPod)</a><a data-viewport%3D"360x511" data-icon%3D"mobile" data-version%3D"Mx" title%3D"Moto X" style%3D"display: inline%3B">Moto X</a><a data-viewport%3D"320x568" data-icon%3D"mobile" data-version%3D"5" title%3D"Apple iPhone 5">Apple iPhone 5</a><a data-icon%3D"mobile" data-version%3D"6" data-viewport%3D"375x667" title%3D"Apple iPhone 6" style%3D"display: inline%3B">Apple iPhone 6</a><a data-icon%3D"mobile" data-version%3D"6+" data-viewport%3D"414x736" style%3D"display: inline%3B" title%3D"Apple iPhone 6+">Apple iPhone 6+</a><a data-icon%3D"mobile" data-version%3D"S6" data-viewport%3D"360x640" style%3D"di
@dv336699
dv336699 / README.md
Last active May 13, 2016 19:39 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@dv336699
dv336699 / vbox-backup.sh
Last active March 30, 2021 20:32
Backup Running VirtualBox VMs
#!/bin/sh
BASEFOLDER=/home/vbox/backups
for VMNAME in $(VBoxManage list runningvms | cut -d ' ' -f1 | sed 's/"//g;')
do
echo ""
VBoxManage controlvm "$VMNAME" acpipowerbutton
echo "Waiting for VM "$VMNAME" to poweroff..."
until $(VBoxManage showvminfo --machinereadable "$VMNAME" | grep -q ^VMState=.poweroff.)
<?php
namespace Sstalle\php7cc;
use PhpParser\PrettyPrinter\Standard as StandardPrettyPrinter;
use Sstalle\php7cc\CompatibilityViolation\CheckMetadata;
use Sstalle\php7cc\CompatibilityViolation\ContextInterface;
use Sstalle\php7cc\CompatibilityViolation\Message;
class CLIResultPrinter implements ResultPrinterInterface
@dv336699
dv336699 / trust_domain.sh
Created May 24, 2017 08:30
trust self signed certificate
#!/bin/bash
# second parameter is optinal
# it'll save to /Users/myuser/ssl-domain-certificates if not provided
# sh trust_domain.sh mydomain.dev
# sh trust_domain.sh mydomain.dev /Users/myuser/ssl-domain-certificates
DOMAIN=$1
SAVE_PATH="${2:-/Users/`whoami`/ssl-domain-certificates}"
@dv336699
dv336699 / commit-message-guidelines.md
Last active February 19, 2018 12:04 — forked from robertpainsi/commit-message-guidelines.md
Commit message guidelines

Commit Message Guidelines

Short (50 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@dv336699
dv336699 / epub.css
Last active May 21, 2018 20:05 — forked from maticrivo/epub.css
You Don't Know JS Ebooks
/* -------------------------------------------------------------- */
/* You don't need to save this file, just use the .sh files below */
body {
text-align: justify;
}
code, pre {
font-family: "Hack", monospace;
}
@dv336699
dv336699 / make-kiosk.sh
Created June 5, 2018 09:50 — forked from voor/make-kiosk.sh
Configuring Kiosk Mode on CentOS
#!/bin/bash
# KIOSK generator for Scientific Linux and CentOS (versions 5; 6 and 7)
# Created using Scientific Linux
# Wasn't made and never tested on different distros than SL/CentOS/EL!
# Version 1.4 for i386 and x86_64
#
# Feel free to contact me: marcin@marcinwilk.eu
# www.marcinwilk.eu
# Marcin Wilk