Skip to content

Instantly share code, notes, and snippets.


Joseadrian Ochoa joseadrian

View GitHub Profile
joseadrian / app.js
Created Jun 18, 2020 — forked from kwhinnery/app.js
HTTP Basic Authentication with Express 4 using the http-auth module
View app.js
var express = require('express'),
auth = require('http-auth');
// Configure basic auth
var basic = auth.basic({
}, function(username, password, callback) {
callback(username == 'admin' && password == 'f00lpr00f');
View responsive-youtube.css
iframe[attribute*=youtube] {
width: 100%;
joseadrian /
Created Nov 9, 2017 — forked from addyosmani/
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

joseadrian / acf-fields.php
Created Apr 4, 2017 — forked from hereswhatidid/acf-fields.php
Create custom product details tabs within WooCommerce using an ACF (Advanced Custom Fields) Repeater field.
View acf-fields.php
if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array (
'key' => 'acf_product_options',
'title' => 'Product Options',
'fields' => array (
array (
'key' => 'acf_product_options_tabbedcontent_label',
'label' => 'Tabbed Content',
joseadrian / reset.sass
Created Apr 4, 2016 — forked from trey/reset.sass
Eric Meyer's reset.css in Sass. Originally by @postpostmodern.
View reset.sass
v2.0 | 20110126
License: none (public domain) */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
joseadrian / my_activity.xml
Last active Aug 7, 2018
Remove glow / edges on Navigation View
View my_activity.xml
<?xml version="1.0" encoding="utf-8"?>
< xmlns:android=""
joseadrian / ip.conf
Created Oct 28, 2015 — forked from mishak87/ip.conf
Nginx: Support only requests with Host header (disable access via bare IP)
View ip.conf
# this file blocks ip requests - only request with Host are supported
server {
listen 80 default_server;
listen 443 default_server ssl;
server_name _;
return 444;
joseadrian / responsive_likebox.html
Created Oct 27, 2015
Responsive Facebook Like Box
View responsive_likebox.html
<!DOCTYPE html>
<script src="//" type="text/javascript"></script>
<div id="container" style="width:100%;">
<div class="fb-like-box" data-href="" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
View hexToRGB.php
var_dump (
array_combine(['r','g','b'], sscanf('FF0000', "%02x%02x%02x"))