Skip to content

Instantly share code, notes, and snippets.

View AdrianoCahete's full-sized avatar
🎯
Focusing

Adriano Cahete AdrianoCahete

🎯
Focusing
View GitHub Profile
@cobyism
cobyism / gh-pages-deploy.md
Last active April 9, 2025 16:06
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@JaHIY
JaHIY / components.patch
Last active April 9, 2017 20:46
patch: for Echofon(Firefox Add-on) 2.5.2
diff -uNr /home/jahiy/Documents/echofon_for_twitter-2.5.2-fx/echofon_for_twitter-2.5.2-fx/components/nsEchofon.js /home/jahiy/Documents/echofon_for_twitter-2.5.2-fx/[email protected]/components/nsEchofon.js
--- /home/jahiy/Documents/echofon_for_twitter-2.5.2-fx/echofon_for_twitter-2.5.2-fx/components/nsEchofon.js 2012-09-19 06:55:02.000000000 +0800
+++ /home/jahiy/Documents/echofon_for_twitter-2.5.2-fx/[email protected]/components/nsEchofon.js 2013-01-27 16:56:49.000000000 +0800
@@ -25,7 +25,7 @@
Components.utils.import("resource://echofon/TwitterClient.jsm");
Components.utils.import("resource://echofon/EchofonHttpRequest.jsm");
Components.utils.import("resource://echofon/Timeline.jsm");
- Components.utils.import("resource://echofon/EchofonGA.jsm");
+ //Components.utils.import("resource://echofon/EchofonGA.jsm");
@tlinkner
tlinkner / Output Android Icons.jsx
Last active February 19, 2021 14:15
Photoshop script to output Android icons
// Output Android Icons.jsx
// 2012 Todd Linkner
// License: none (public domain)
// v1.0
//
// This script is for Photoshop CS6. It outputs Android icons of the
// following sizes from a source PSD at least 512px x 512px
//
// store:
// Icon.png (512px x 512px)
@ttilley
ttilley / arris_password_of_the_day_brute_force.rb
Created September 7, 2012 07:57
attempt to brute force an arris "password of the day" algorithm seed
require 'date'
require 'time'
require 'uri'
require 'net/http'
require 'typhoeus'
class PasswordOfTheDay
TABLE1 = [
[15, 15, 24, 20, 24],
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@procload
procload / Grid Backgrounds in Twitter Bootstrap
Created March 6, 2012 18:52
Custom mixin to show grid backgrounds in Twitter Bootstrap
// Show a Grid Background
// **************************************************
// **************************************************
@function build-grid( $total-columns: 19,
$page-width: 930px,
$column-width-percent: 30px,
$gutter-width-percent: 20px,
$column-color: rgba(255,0,255,.05)) {
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jswartwood
jswartwood / Run in LOCAL terminal...
Created February 19, 2012 01:53
Automatic Git deploys on Dreamhost
# Replace any brackets with real values
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal
ssh [user]@[host]
cd ~
mkdir [mydomain_com].git
cd [mydomain_com].git
git init --bare
vi hooks/post-receive
# Enter the code from the "post-receive" file (in this gist); save + quit
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active October 29, 2024 21:43
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