Skip to content

Instantly share code, notes, and snippets.

View omelsoft's full-sized avatar

Cromwell Bayon omelsoft

View GitHub Profile
@omelsoft
omelsoft / Common-Currency.json
Created March 21, 2020 11:45 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@omelsoft
omelsoft / object-to-array.pipe.ts
Created November 2, 2018 09:02 — forked from clamarque/object-to-array.pipe.ts
A pipe for Angular2 - Transform Object to Array
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 April 12, 2018 20:11 — forked from P1xt/wikipedia.service.ts
Setting headers on an Angular 2 http get request
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
Last active February 16, 2020 20:18 — forked from haydenbr/cache-busting.js
ionic cache busting
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
cheerio = require('cheerio'),
revHash = require('rev-hash');
/**
*
* @param string fileName
@omelsoft
omelsoft / pldt-home-fibr-an5506-04-fa-rp2616-advanced-settings.md
Created April 10, 2018 09:04 — forked from kleo/backspace.md
PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings

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 / getcookiebyname.js
Created August 24, 2017 08:23 — forked from meandmax/getcookiebyname.js
get the cookie value by name if a cookie name exists.
/**
* 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) {