Skip to content

Instantly share code, notes, and snippets.

View bipoza's full-sized avatar
📱

Bittor Poza bipoza

📱
View GitHub Profile
@bipoza
bipoza / Apple_mobile_device_types.txt
Created September 24, 2021 14:23 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@bipoza
bipoza / vscode_luzapenak.md
Last active May 31, 2021 14:57
VSCode - Kodea garbi mantentzeko luzapenak
add_shortcode('wps_event_link', 'wps_event_link');
function wps_event_link() {
$post_id = '{{ post_data:ID }}';
}
@bipoza
bipoza / jeztaze.json
Last active November 18, 2021 08:17
Petilla Aragoi eta Jeztaze - OSM Geojson mugak
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bipoza
bipoza / iframe.html
Last active February 8, 2021 16:44
TinyMCE Custom button with Dialog openURL - Demo SOURCE: https://codesandbox.io/embed/tinymce-dialog-openurl-demo-fpfew
<p>Name: </p><input id="name" type="text"/>
<p>Select a Thing:</p>
<select name="thingselect" id="thingselect">
<option value="thing1">Thing 1</option>
<option value="thing2">Thing 2</option>
<option value="thing3">Thing 3</option>
</select>
<br>
@bipoza
bipoza / wc-products-displayed-per-page.php
Created December 16, 2020 09:08 — forked from woogists/wc-products-displayed-per-page.php
[Theming Snippets] Change number of products displayed per page
/**
* Change number of products that are displayed per page (shop page)
*/
add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 );
function new_loop_shop_per_page( $cols ) {
// $cols contains the current number of products per page based on the value stored on Options -> Reading
// Return the number of products you wanna show per page.
$cols = 9;
return $cols;
@bipoza
bipoza / stop-video.js
Created September 9, 2020 14:26 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@bipoza
bipoza / token.interceptor.ts
Created July 28, 2020 08:29 — forked from danielcrisp/token.interceptor.ts
TokenInterceptor - Async HTTP Interceptors with Angular 4
import { Injectable } from '@angular/core';
import { HttpErrorResponse, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/mergeMap';
import { AuthService } from './auth.service';
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
@bipoza
bipoza / Rendering hyperlinks from HTML strings in Ionic 4 and Angular
Created January 8, 2020 12:33
Rendering hyperlinks from HTML strings in Ionic 4 and Angular