Skip to content

Instantly share code, notes, and snippets.

View giuliandrimba's full-sized avatar
🥁

Giulian Drimba giuliandrimba

🥁
View GitHub Profile
@giuliandrimba
giuliandrimba / hack.sh
Last active March 15, 2022 08:04 — forked from erikh/hack.sh
SHELL: OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
<div class="profile">
<div
class="profile-image"
style="background: url('/images/<%= person.imgSrc %>') top center no-repeat; background-size: cover;"
></div>
<div class="profile-details">
<h1 class="profile-name">
<%- person.firstname %> <%- person.lastname %>
</h1>
import Assets from 'assets-manager';
Assets.addQueue('general', appData.assets.general)
Assets.addQueue('intro', appData.assets.intro)
Assets.addQueue('projects', appData.assets.projects)
// No layout.js, chamamos:
Assets.start('general');
// No intro.js, chamamos:
{
'general': [
'path/to/file.jpg',
'path/to/file2.jpg'
'path/to/file3.jpg'
],
'intro': [
'path/to/file.jpg',
'path/to/file2.jpg'
'path/to/file3.jpg'
// Function to disable "pull-to-refresh" effect present in some webviews.
// Especially Crosswalk 12 and above (Chromium 41+) runtimes.
window.addEventListener('load', function() {
var lastTouchY = 0 ;
var maybePreventPullToRefresh = false ;
// Pull-to-refresh will only trigger if the scroll begins when the
// document's Y offset is zero.
@giuliandrimba
giuliandrimba / git-empty-branch.txt
Created June 29, 2012 18:02
GIT: Create empty branch
git symbolic-ref HEAD refs/heads/empty
touch .gitignore
git add .gitignore
git commit -m 'Initial headless branch commit'
@giuliandrimba
giuliandrimba / loopinfinito.htaccess
Created December 14, 2012 13:58
Apache: loopinfinito.com.br .htaccess
---
layout: none
permalink: .htaccess
---
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
# httpd.apache.org/docs/2.2/howto/htaccess.html
@giuliandrimba
giuliandrimba / namespace.js
Created December 6, 2012 01:45
JavaScript: namespace helper
function namespace(name)
{
var namespaces = name.split(".");
var name = "";
function getName(parent)
{
if(namespaces.length > 0)
{
name = namespaces.shift();
@giuliandrimba
giuliandrimba / jquery.loadimages.js
Created November 13, 2012 19:36
JavaScript: Load all images inside element
(function($)
{
/*
* Author: Giulian Drimba
*
*/
$.fn.loadImages = function(callback, scope)
{
var images = $(this).find("img");
@giuliandrimba
giuliandrimba / gist:3104727
Last active October 7, 2015 04:18 — forked from millermedeiros/gist:3057782
Infos: Links sobre otimização de performance (WPO)