Skip to content

Instantly share code, notes, and snippets.

View jalamprea's full-sized avatar
👋

Julian Lamprea jalamprea

👋
View GitHub Profile
'use strict';
const { src, dest, watch, series } = require('gulp');
const browserSync = require('browser-sync').create();
const del = require('del');
const sass = require('gulp-sass');
const newer = require('gulp-newer');
const cssmin = require('gulp-cssmin');
const jshint = require('gulp-jshint');
const concat = require('gulp-concat');
const rename = require('gulp-rename');
@jalamprea
jalamprea / git-config-golang-private-github.md
Last active March 18, 2020 15:17 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!

Sources:

for n in $(kubectl get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob)
do
mkdir -p $(dirname $n)
kubectl get -o=yaml --export $n > $n.yaml
done
@jalamprea
jalamprea / http-request.php
Last active January 19, 2020 18:08
A native way to do HTTP Request using CURL, without external dependencies.
// Send data to another endpoint using CURL
function callAPI($url=false, $params=array(), $method='GET', $isJson=false) {
if ($url) {
//open connection
$ch = curl_init();
// $ip = $_SERVER['REMOTE_ADDR'];
if($method==='GET' && !empty($params)) {
$query_params = http_build_query($params);
@jalamprea
jalamprea / YoutubeSearcher.js
Created August 6, 2019 14:32
Implementation of Youtube Search API with Pure Javascript
var YoutubeSearcher = (function() {
function YoutubeSearcher() {
this.configuration = {};
this.dependencies = {};
}
YoutubeSearcher.prototype.searchSongs = function(query) {
var dependencies = this.dependencies;