Skip to content

Instantly share code, notes, and snippets.

View xtrasmal's full-sized avatar
🟢
--- 200 OK

Xander xtrasmal

🟢
--- 200 OK
View GitHub Profile
@xtrasmal
xtrasmal / Chromium Mobile Device List
Created March 6, 2020 20:54 — forked from devinmancuso/Chromium Mobile Device List
Mobile Device Emulation List from Chromium
#Pulled from Chromium at: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/devtools/front_end/toolbox/OverridesUI.js&q=WebInspector.OverridesUI._phones%20file:OverridesUI.js&sq=package:chromium&type=cs&l=310
#Phones
Define_phones = [
{deviceName: "Apple iPhone 3GS", width: 320, height: 480, deviceScaleFactor: 1, userAgent: "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5", touch: true, mobile: true},
{deviceName: "Apple iPhone 4", width: 320, height: 480, deviceScaleFactor: 2, userAgent: "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5", touch: true, mobile: true},
{deviceName: "Apple iPhone 5", width: 320, height: 568, deviceScaleFactor: 2, userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Versi
@xtrasmal
xtrasmal / AppLayout.js
Created April 13, 2019 21:23 — forked from unr/AppLayout.js
Bare Minimum Laravel Echo in Nuxt.JS example.
// In my global app layout, once my app is mounted and ready to listen...
import { mapActions, mapGetters } from 'vuex';
const Layout = {
mounted() {
// set up pusher listeners
this.connectToPublicChannel();
this.$watch('authenticated', (auth) => {
if (auth) this.connectToUserChannel();
<?php
class Repository
{
public function findAll(): array
{
return $this->connection->project(
sprintf('SELECT * FROM %s', self::TABLE_NAME),
[],
function(array $row): Domain\MyObject {
return Domain\MyObject::fromArray($row);
@xtrasmal
xtrasmal / config.yml
Last active August 29, 2015 14:25 — forked from simshaun/config.yml
Symfony2 form help text
twig:
form:
resources:
- "Form/form_theme.html.twig"
// jQuery Connect v0.0.1
// (c) Zulfa Juniadi <http://zulfait.blogspot.com/>
// Usage : var connection = $.connect('#elem1', '#elem2', {options});
// Documentation : http://zulfait.blogspot.com/2013/07/jquery-connect.html
// Source : https://gist.github.com/zulfajuniadi/5928559#file-jquery-connect-js
// Requires : jQuery v1.9+ (Older versions may work, but not tested)
// Suggests : jQuery UI (It works with draggable elements!)
// MIT License
;(function($) {
/*
Copyright (C) 2021 Pascal de Vink (Tweakers.net)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
<!doctype html>
<head>
<meta charset="utf-8">
<title>Grid test</title>
<link rel="stylesheet" href="css/example.css">
</head>
<body>
<div id="wrapper">
//
// CRUD API for RESTful services with URLs similar 'http://services.mysite.com/classes/Book'.
//
// e.g. parse.get(
// "Book",
// 123,
// function(response){ console.log(response.toString());}
// );
//
services.factory('parse', function($rootScope, $http) {