Skip to content

Instantly share code, notes, and snippets.

View princejoseph's full-sized avatar

Prince Joseph princejoseph

  • Vista, San Diego
View GitHub Profile
[alias]
[alias]
gui = !sh -c /usr/local/opt/git/libexec/git-core/git-gui
co = checkout
fco = "!f(){ git fetch origin \"$1\" && git checkout \"$1\"; };f"
conflicts = diff --name-only --diff-filter=U
spull = "!f(){ git checkout \"$1\" && git pull origin \"$1\"; };f"
branch-name = "!git rev-parse --abbrev-ref HEAD"
upush = "!git push -u origin $(git branch-name)"
code-review = difftool origin/dev...
CREATE FUNCTION public.get_xmlbinary() RETURNS character varying
LANGUAGE plpgsql
AS $$
DECLARE
xmlbin varchar;
BEGIN
select into xmlbin setting from pg_settings where name='xmlbinary';
RETURN xmlbin;
END;
$$;
@princejoseph
princejoseph / search.ts
Last active June 26, 2018 17:12
Search
let searchTerm = "YGR556LRKB0"
let result = {"data":{"modelSearch":{"totalCount":5,"models":[{"id":"01207501198YGR556LRKB0","number":"YGR556LRKB0","title":"REFRIGERATOR RANGE","brand":{"name":"WHIRLPOOL"},"vocabularies":[{"name":"Applicances"},{"name":"Cooking*"},{"name":"Gas Ranges/Ovens*^"}],"partCount":null},{"id":"01648001198YGR556LRKP0","number":"YGR556LRKP0","title":"REFRIGERATOR","brand":{"name":"WHIRLPOOL"},"vocabularies":[{"name":"Appliances"},{"name":"Refrigerators*^"},{"name":"Refrigerator Accessories^"}],"partCount":109},{"id":"120000012329030","number":"9030","title":"SEWING MACHINE","brand":{"name":"SINGER"},"vocabularies":[{"name":"Sewing*"},{"name":"Sewing*"}],"partCount":423},{"id":"01650001198GD5RHAXSQ01","number":"GD5RHAXSQ01","title":"SIDE-BY-SIDE REFRIGERATOR","brand":{"name":"WHIRLPOOL"},"vocabularies":[{"name":"Appliances"},{"name":"Refrigerators*^"},{"name":"Side-by-Side Refrigerator^"}],"partCount":109},{"id":"0165000058225357398600","number":"25357398600","title":"REFRIGERATOR","bran
@princejoseph
princejoseph / upgrade-postgres-9.3-to-9.5.md
Last active August 9, 2016 10:13 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

Install postgresql 9.5:

wget https://alioth.debian.org/scm/loggerhead/pkg-postgresql/postgresql-common/trunk/download/head:/apt.postgresql.org.s-20130224224205-px3qyst90b3xp8zj-1/apt.postgresql.org.sh
chmod a+x apt.postgresql.org.sh
sed -i -e 's/$CODENAME-pgdg main/$CODENAME-pgdg main 9.5/g' apt.postgresql.org.sh
sudo ./apt.postgresql.org.sh

sudo apt-get install postgresql-9.5
sudo apt-get install postgresql-client-9.5
@princejoseph
princejoseph / es.sh
Last active August 29, 2015 14:12 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@princejoseph
princejoseph / es.sh
Last active August 29, 2015 14:12 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
{
"demographic": {
"gender": "male"
},
"instagram": {
"created_time": "1414405837",
"text": "like4like? @mery_didio",
"from": {
"username": "isameershaikh",
"profile_picture": "http://photos-d.ak.instagram.com/hphotos-ak-xaf1/10707075_648463821919083_1635111248_a.jpg",
{
"demographic": {
"gender": "female"
},
"instagram": {
"from": {
"id": "1319912752",
"username": "rozellabenally",
"full_name": "Lisa Parker",
"profile_picture": "http://images.ak.instagram.com/profiles/profile_1319912752_75sq_1399904319.jpg"
{
"source": {
"id": "2d9419cdeb0a4be3a8f87febfada7013"
},
"interaction": {
"author": {
"link": "http://instagram.com/martehveem",
"avatar": "http://images.ak.instagram.com/profiles/profile_17694049_75sq_1366492391.jpg",
"name": "martehveem",
"id": "17694049"
<html>
<body>
<a href="google.com">Link</a>
</body>
</html>