Skip to content

Instantly share code, notes, and snippets.

@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
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
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@nebiros
nebiros / gist:9196645
Last active January 8, 2019 05:10
Send Push Notifications from node.js with Parse.com SDK
var Parse = require("parse").Parse;
Parse.initialize(
"", // applicationId
"", // javaScriptKey
"" // masterKey
);
var query = new Parse.Query(Parse.Installation)
, data = {
@funroll
funroll / Podfile-snippet
Created June 22, 2014 04:23
CocoaPods post_install step for changing Build Active Architecture Only from Yes to No.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active April 8, 2024 18:07
The best FRP iOS resources.

Videos

@LeonardoCardoso
LeonardoCardoso / Podfile-Snippet
Last active October 30, 2018 09:59
Podfile Snippet: 'Build Active Architecture Only' to 'NO' and 'Valid Architectures' to '$(ARCHS_STANDARD)' to all pods
# insert this at the end of your Podfile
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ARCHS'] = '$(ARCHS_STANDARD)' # it sets 'Valid Architectures' to '$(ARCHS_STANDARD)' to all pods
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO' # it sets 'Build Active Architecture Only' to 'NO'
end
end
end
@LeonardoCardoso
LeonardoCardoso / cpwd.sh
Last active October 30, 2018 09:59
One line command to copy the current terminal path on Mac
#...
alias cpwd="pwd | tr -d '\n' | pbcopy"
#...
@LeonardoCardoso
LeonardoCardoso / ScrollTextView.java
Last active January 21, 2022 07:37
TextView with continuous scroll marquee animation no matter where the Activity focus is.
public class ScrollTextView extends TextView {
public ScrollTextView(Context context) {
super(context);
}
public ScrollTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}