Skip to content

Instantly share code, notes, and snippets.

@marcorinck
marcorinck / slide-down.transition.ts
Last active October 15, 2022 09:01
custom ionic page transitions: "slide" and "slide-down"
import {Animation} from "ionic-angular/animations/animation";
import {isPresent} from "ionic-angular/util/util";
import {PageTransition} from "ionic-angular/transitions/page-transition";
const DURATION = 500;
const TRANSFORM = "transform";
const MOVED_DOWN = "translateY(100%)";
const NOT_MOVED = "translateY(0)";
const ZINDEX = "z-index";
const OPACITY = "opacity";
@Rich-Harris
Rich-Harris / README.md
Last active November 1, 2024 12:15
Unifying Rollup options

Rollup 0.48 introduces a few changes to the options object, because the current options are confusingly different between the CLI and the options exported by your config file.

Changes to the config file

  • entry is now input
  • sourceMap and sourceMapFile are now sourcemap and sourcemapFile (note casing)
  • moduleName is now name
  • useStrict is now strict

The dest and format options are now grouped together as a single output: { file, format, ... } object. output can also be an array of { file, format, ... } objects, in which case it behaves similarly to the current targets. Other output options — exports, paths and so on — can be added to the output object (though they will fall back to their top-level namesakes, if unspecified).

@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
{
"dependencies":{
"main.js":{
"files":[
"scripts/main.js"
],
"main":true
},
"main.css":{
"files":[
@CucumisSativus
CucumisSativus / Capfile
Last active April 26, 2020 14:09
Mydevil capistrano
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'
require "whenever/capistrano"
# Load custom tasks from `lib/capistrano/tasks' if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
@bjorgvino
bjorgvino / yosemite ntfs read+write.txt
Last active December 2, 2021 03:58
osxfuse + ntfs-3g + Yosemite = NTFS R/W
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@InSuperposition
InSuperposition / SassMeister-input.scss
Created February 4, 2014 16:47
VideoJS default styles in Sass.
// ----
// Sass (v3.2.14)
// Compass (v0.12.2)
// ----
/*!
Video.js Default Styles (http://videojs.com)
Version GENERATED_AT_BUILD
Create your own skin at http://designer.videojs.com
*/
@awinograd
awinograd / gist:4699980
Last active January 30, 2018 22:54
cvim file for opening links from better_error and RailsPanel in vim on ubuntu.
#! /usr/bin/env ruby
# Modified from : http://www.tkalin.com/blog_posts/using-console-vim-as-vim-protocol-handler-in-ubuntu
# NOTE: This opens with a link to the mvim protocol for compatibility with RailsPanel
# goes to /usr/local/bin/cvim
require 'uri'
require 'cgi'
full_path = ARGV[0]
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
# filename: config/locales/pl.rb
# taken from: http://github.com/svenfuchs/i18n/blob/4d8e2e3b8ce9841542cc3cf4d33b7a7702b2abc1/test/test_data/locales/plurals.rb
{:pl => { :i18n => { :plural => { :keys => [:one, :few, :other], :rule => lambda { |n| n == 1 ? :one : [2, 3, 4].include?(n % 10) && ![12, 13, 14].include?(n % 100) && ![22, 23, 24].include?(n % 100) ? :few : :other } } } } }