Skip to content

Instantly share code, notes, and snippets.

View favrik's full-sized avatar
🏀

Favio Manriquez favrik

🏀
View GitHub Profile
@Hypnopompia
Hypnopompia / loggly-access.php
Created December 10, 2011 01:22
PHP Script to send apache access and error log lines to loggly.
<?php
/*
loggly-access.php
Sends apache access log lines to loggly via HTTP input
Author: TJ Hunter (tjhunter@gmail.com)
Add the following line to your apache config:
CustomLog "|php /path/to/loggly-access.php VirtualHostServerNameHere logglyInputHash" combined
*/
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active May 3, 2026 02:39
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@orakili
orakili / 1217396_drupal_link_optional_title_required_field_validation_error.patch
Created October 3, 2011 06:07
#1217396 - Drupal 7.x - Link - Required field & optional title produces validation error.
@yortz
yortz / carrierwave.rb
Created November 27, 2010 16:49
image_uploader.rb
#config/initializers/carrierwave.rb
CarrierWave.configure do |config|
if Rails.env.production? or Rails.env.development?
config.storage :cloud_files
config.cloud_files_username = "your_username"
config.cloud_files_api_key = "your_key"
config.cloud_files_container = "test"
config.cloud_files_cdn_host = "c0012345.cdnn.cloudfiles.rackspacecloud.com"
def store_dir
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2026 21:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@jolantis
jolantis / config.php
Created July 16, 2010 14:16 — forked from eeinsider/config.php
ee2 config.php
<?php
/*
|--------------------------------------------------------------------------
| ExpressionEngine Config Items
|--------------------------------------------------------------------------
|
*/
$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://";
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active May 11, 2026 19:45 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.