Skip to content

Instantly share code, notes, and snippets.

(function(){if(typeof easepick === 'undefined'){const easepickScripts = ['https://cdn.jsdelivr.net/npm/@easepick/[email protected]/dist/index.umd.min.js','https://cdn.jsdelivr.net/npm/@easepick/[email protected]/dist/index.umd.min.js','https://cdn.jsdelivr.net/npm/@easepick/[email protected]/dist/index.umd.min.js','https://cdn.jsdelivr.net/npm/@easepick/[email protected]/dist/index.umd.min.js'];easepickScripts.forEach(script => {var scriptElem = document.createElement('script');scriptElem.type = 'text/javascript';scriptElem.src = script;document.head.appendChild(scriptElem);});}function waitForScriptLoad(){if(typeof easepick !== 'undefined' && typeof easepick.RangePlugin !== 'undefined'){mainFunction();}else{setTimeout(waitForScriptLoad, 250);}}waitForScriptLoad();function mainFunction(){let modalHTML = `<div id="modal" style="display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4);"><div style="background-color: #fefefe; margin: 15% aut
@joeyhipolito
joeyhipolito / juniordev.md
Last active July 17, 2023 12:47
outline for junior dev

1. Fundamentals of JavaScript

  • Variables, data types and operators: Understand the basic building blocks of JavaScript.
  • Control flow: Learn how to control the execution of code using if/else, switch, for, while.
  • Functions, scope and closures: Learn how to encapsulate functionality into reusable pieces of code.
  • Objects and arrays: Understand how to use these fundamental JavaScript data structures.
  • ES6+ features: Learn about modern JavaScript features that Angular takes advantage of.
" .vimrc
" Author: Steve Losh <[email protected]>
" Source: http://bitbucket.org/sjl/dotfiles/src/tip/vim/
"
" This file changes a lot. I'll try to document pieces of it whenever I have
" a few minutes to kill.
" Preamble ---------------------------------------------------------------- {{{
" Dear /bin/bash: fuck you and your bullshit, arcane command-line behaviour.
@joeyhipolito
joeyhipolito / layout.css
Created September 8, 2022 14:35
layout.css
/* poppins-regular - latin */
@font-face {
font-family: "Poppins";
font-style: normal;
font-weight: 400;
src: local(""), url("../../fonts/poppins-v20-latin-regular.woff2") format("woff2"), url("../../fonts/poppins-v20-latin-regular.woff") format("woff");
/* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* poppins-500 - latin */
@font-face {
$(function(){
function getPosition(element) {
var xPosition = 0;
var yPosition = 0;
while(element) {
xPosition += (element.offsetLeft - element.scrollLeft + element.clientLeft);
yPosition += (element.offsetTop - element.scrollTop + element.clientTop);
element = element.offsetParent;
<?php
require "TwitterAPIExchange.php";
$settings = array(
'oauth_access_token' => "<ACCESS_TOKEN>",
'oauth_access_token_secret' => "<ACCESS_TOKEN_SECRET>",
'consumer_key' => "<CONSUMER_KEY>",
'consumer_secret' => "<CONSUMER_SECRET>",
);
@joeyhipolito
joeyhipolito / apache nginx www permission fix
Created January 18, 2015 20:41
Fixing permissions in /var/www or /usr/share/nginx/www
Repeatedly, you'll be fixing permissions, ownership in these directories `/var/www` or `/usr/share/nginx/www` whenever you are deploying your websites.
Here are the commands to save you some time
**apache**
sudo add-user $(whoami) www-data && \
sudo chown -R www-data:www-data /var/www && \
sudo chmod -R g+rw /var/www; find /var/www -type d -print0 | sudo xargs -0 chmod g+s
@joeyhipolito
joeyhipolito / .tmux.conf
Last active August 29, 2015 14:07
My terminal configurations
source /usr/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
// old
<p class="b-side-post__title">{{post.content | htmlToPlaintext}}</p>
// new
<p class="b-side-post__title">{{post.content | htmlToPlaintext | cut:true:45:' ...'}}</p>
@joeyhipolito
joeyhipolito / unhide.bat
Created August 2, 2014 08:00
Unhide files and folders hidden by a virus.
@echo off
echo "Type the drive letter (just the letter)"
set /p letter=
attrib -s -h -a /s /d %letter%:\*.*
echo "Complete!"