Skip to content

Instantly share code, notes, and snippets.

Cromwell Bayon omelsoft

Block or report user

Report or block omelsoft

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@omelsoft
omelsoft / object-to-array.pipe.ts
Created Nov 2, 2018 — forked from clamarque/object-to-array.pipe.ts
A pipe for Angular2 - Transform Object to Array
View object-to-array.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'keys'})
export class KeysPipe implements PipeTransform {
transform(value, args:string[]) : any {
let keys = [];
for (let key in value) {
keys.push({key: key, value: value[key]});
}
return keys;
@omelsoft
omelsoft / wikipedia.service.ts
Created Apr 12, 2018 — forked from P1xt/wikipedia.service.ts
Setting headers on an Angular 2 http get request
View wikipedia.service.ts
import { Injectable } from '@angular/core';
import { Http, Headers, Response } from '@angular/http';
@Injectable()
export class GetWikipediaService {
constructor(private http: Http) { }
searchWiki = (query) => {
@omelsoft
omelsoft / cache-busting.js
Created Apr 12, 2018 — forked from haydenbr/cache-busting.js
ionic cache busting
View cache-busting.js
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
cheerio = require('cheerio'),
revHash = require('rev-hash');
var rootDir = path.resolve(__dirname, '../');
var wwwRootDir = path.resolve(rootDir, 'platforms', 'browser', 'www');
var buildDir = path.join(wwwRootDir, 'build');
View pldt-home-fibr-an5506-04-fa-rp2616-advanced-settings.md

PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings

By default the PLDT HOME FIBR AN5506-04-FA RP2616 comes only with limited settings.

Hidden from the web interface are the rest of the router's capabilities and advanced settings.

We just need to enter the right url for the settings you're looking for.

We need to be logged in before we can do anything else, use your defined password if you already set the admin password.

@omelsoft
omelsoft / Advance-Custom-Fields.php
Last active Oct 7, 2017
How to Update and Save Advance Custom Fields data within a Wordpress Loop
View Advance-Custom-Fields.php
<?php
/**
* The purpose of this is that I was using an old Wordpress theme which generates a custom fields. Those fields will only be available
* when that theme is active. So when switching theme, all the posts meta data will not be inherited by the new theme.
*
* Note: Old theme is currently active
*
* So, I decided to use Advance Custom Fields and created fields for each keys used by the old theme. I was able to retrieve the key-values
* from the old theme and saved the values to the newly created ACF fields by iterating over each post. By simple using a sample snippet:
*
@omelsoft
omelsoft / aps.upload.file.directive.js
Last active Sep 26, 2017
AngularJS File Upload using Material Design
View aps.upload.file.directive.js
angular.module('MyApp')
.controller('AppCtrl', function($scope) {
}).directive('apsUploadFile', apsUploadFile);
function apsUploadFile() {
var directive = {
restrict: 'E',
template: '<input id="fileInput" type="file" class="ng-hide"> <md-button id="uploadButton" class="md-raised md-primary" aria-label="attach_file"> Choose file </md-button><md-input-container md-no-float> <input id="textInput" ng-model="fileName" type="text" placeholder="No file chosen" ng-readonly="true"></md-input-container>',
@omelsoft
omelsoft / getcookiebyname.js
Created Aug 24, 2017 — forked from meandmax/getcookiebyname.js
get the cookie value by name if a cookie name exists.
View getcookiebyname.js
/**
* get cookie by name without using a regular expression
*/
var getCookie = function(name) {
var getCookieValues = function(cookie) {
var cookieArray = cookie.split('=');
return cookieArray[1].trim();
};
var getCookieNames = function(cookie) {
You can’t perform that action at this time.