Skip to content

Instantly share code, notes, and snippets.

View elalemanyo's full-sized avatar
🥘
NaN

victor elalemanyo

🥘
NaN
View GitHub Profile
@mrconnerton
mrconnerton / gist:1979037
Last active December 4, 2018 15:13
node form in ctools modal drupal 7
<?php
/*
Make Sure you include:
ctools_include('modal');
ctools_modal_add_js();
On the pages you put your link.
*/
@stansmet
stansmet / .siegerc
Created July 7, 2012 20:26
My siegerc
# Updated by Siege 2.72, July-07-2012
# Copyright 2000-2007 by Jeffrey Fulmer, et al.
#
# Siege configuration file -- edit as necessary
# For more information about configuring and running
# this program, visit: http://www.joedog.org/
#
# Variable declarations. You can set variables here
# for use in the directives below. Example:
@edmondburnett
edmondburnett / gist:40e7db34416fdc734846
Last active April 17, 2019 16:21
Push-to-Deploy, Python edition - git post-receive hook script
#!/usr/bin/env python
# post-receive hook for git-based deployments
import sys
import os
from subprocess import call
# configuration
deploy_to_path = '/path/to/deploy/directory/'
deploy_branch = 'master'
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L]
</IfModule>
@aanton
aanton / puppeteer.js
Created September 15, 2017 14:09
Puppeteer screenshot demo
'use strict';
const puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch({
headless: true,
ignoreHTTPSErrors: true,
timeout: 1000

Scrolleo

Apple has been creating some amazing scrolling video sites lately and I've been trying to create a simplified plugin to recreate this effect. This is the alpha version of this plugin. You can see an example of the effect I'm recreating here: http://www.apple.com/macbook/

This uses requestAnimationFrame and allows you to create multiple custom scrolling videos easily.

A Pen by Mark Teater on CodePen.

License.

@AlexPashley
AlexPashley / mixins.scss
Created July 5, 2013 14:44
SASS: Mixins for CSS
/* MIXINs */
@mixin transition( $val : ease 0.5s ) {
-webkit-transition: $val;
-moz-transition:$val;
-o-transition:$val;
-ms-transition:$val;
transition:$val;
}
@mixin text-shadow( $top: 3px, $left: 3px, $blur: 3px , $colour: #333 ) {
@snirgel
snirgel / jquery.mirrorvalue.js
Created March 14, 2012 11:03
Mirrors the input of an textfield, identified by id
/**
* @author Karina Mies
* @description Mirrors the input of an textfield, identified by id
*/
jQuery.fn.mirrorValue = function(){
return this.each(function(){
var lCurrentText, lId, lMirrorClass;
jQuery(this).keyup(function(e) {
lId = '#'+jQuery(this).attr('id');
lMirrorClass = '.'+jQuery(this).attr('id')+'-mirror';
@FrostyX
FrostyX / FacebookDebugger.php
Last active February 9, 2022 11:15
Facebook API - Force facebook to reload cache from your website
<?php
class FacebookDebugger
{
/*
* https://developers.facebook.com/docs/opengraph/using-objects
*
* Updating Objects
*
* When an action is published, or a Like button pointing to the object clicked,
* Facebook will 'scrape' the HTML page of the object and read the meta tags.
@pascalduez
pascalduez / demo.module
Created December 24, 2011 15:02
Drupal 7 — Basic Ajax form submit (Ajax framework)
<?php
/**
* @file
* Demo module, Basic Ajax form submit (Ajax framework).
*/
/**
* Implements hook_menu().
*/