Skip to content

Instantly share code, notes, and snippets.

View djnet00's full-sized avatar

Julián Mesa djnet00

View GitHub Profile
@djnet00
djnet00 / print_zpl.php
Last active July 23, 2019 13:40 — forked from erighetto/print_zpl.php
Send raw ZPL to Zebra printer
<?php
/*
// OTHER OPTION
// ----------------------
// Put your ZPL code in a file e.g "barcode.zpl"
// Share your Zebra Printer, so that it can be accessed In Windows Explorer by typing
// e.g "\192.168.1.113[YOUR PRINTER NAME]";
// Create PHP File, and write code:
@djnet00
djnet00 / app.js
Created November 9, 2015 18:22 — forked from jgoux/app.js
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@djnet00
djnet00 / UISwiftRestDemo
Created October 27, 2015 02:26 — forked from cmoulton/UISwiftRestDemo
Quick & dirty REST API calls with Swift. See http://grokswift.com/simple-rest-with-swift/
// MARK: Using NSURLSession
// Get first post
let postEndpoint: String = "http://jsonplaceholder.typicode.com/posts/1"
guard let url = NSURL(string: postEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = NSURLRequest(URL: url)
@djnet00
djnet00 / README.md
Created October 25, 2015 05:46 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@djnet00
djnet00 / addsqlite.sh
Last active August 29, 2015 14:19 — forked from botris/addsqlite.sh
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git

Setup new mac from scratch

These commands are good as of 2010-11-18.

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

Install xcode (download, or on the OS X install DVD)

http://developer.apple.com/technology/xcode.html
try {
DB::connection()->getPdo()->beginTransaction();
// database queries here
DB::connection()->getPdo()->commit();
} catch (\PDOException $e) {
// Woopsy
DB::connection()->getPdo()->rollBack();
}
<?php
class MatchesControllerTest extends TestCase
{
protected $user;
protected $profile;
public function setUp()
{
parent::setUp();
DB::beginTransaction();
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
* Updated for Laravel 4.1.8 (2013-12-13)
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
exit('Only to be used as an helper for your IDE');