Skip to content

Instantly share code, notes, and snippets.

View wayferer's full-sized avatar
🧙‍♂️
Working from home

Abdullah Norozi Iranzad wayferer

🧙‍♂️
Working from home
View GitHub Profile
@DavidFrahm
DavidFrahm / 020_build_version.js
Last active December 28, 2020 00:05
Cordova build hook, to use build version from config.xml in your hybrid app
#!/usr/bin/env node
// This plugin replaces text in a file with the app version from config.xml.
var wwwFileToReplace = "js/build.js";
var fs = require('fs');
var path = require('path');
var rootdir = process.argv[2];
@zdarovka
zdarovka / core-list with detail.html
Created March 30, 2015 08:47
Core-list with transition to detail
<core-animated-pages fit selected="{{view}}">
<section>
<core-list on-core-activate="{{selectView}}">
<my-item></my-item>
</core-list>
</section>
<section>
<my-item-detail data="{{selectedItem}}"></my-item-detail>
</section>
@aflorezd
aflorezd / dropbox_storage.rb
Created March 8, 2016 21:25
spreecommerce/solidus, use dropbox for storage images. (using gem paperclip-dropbox)
#initializer/dropbox_storage.rb
attachment_config = {
dropbox_credentials: Rails.root.join('config/dropbox.yml'),
storage: :dropbox,
styles: {
mini: "48x48>",
small: "100x100>",
@PaulKinlan
PaulKinlan / add-to-homescreen-test.html
Last active September 24, 2020 20:37
iOS Add to Homescreen => simulate web app manifest
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Add to Homescreen</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Test name 2">
@knowbody
knowbody / RNfontWeights.js
Created July 14, 2016 13:42
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black

Incrementing Android Version Documentation

Setup

Step One

Append the following version variable definitions to your app's build.gradle file, this can be anywhere but preferably at the top of the file above all "apply" declarations. You may set the values to your current build/version codes if this is not a new project.

def VERSION_BUILD=0
def VERSION_MAJOR=0
def VERSION_MINOR=0
@xeoncross
xeoncross / hugo.list.tests.html
Created August 14, 2017 22:08
Different ways to show hugo (gohugo) post-list, posts by tags, posts by subject, nested posts, etc...
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
<main>
<article id="content">
<!-- <pre>{{ printf "%#v" . }}</pre> -->
@kieranmv95
kieranmv95 / _spacing-helper.scss
Last active February 6, 2019 02:10
Generates a array of spacing helper classes for margin and padding
// Customisable spacing units. these can be changed and new ones added
$spacing-units: (
1: 3px,
2: 5px,
3: 8px,
4: 13px,
5: 21px,
);
// These will not change this is just to help generate the classes with the correct naming
@withoutwax
withoutwax / custom_fields_devise.markdown
Last active April 27, 2024 00:43
Adding Custom Fields to Devise

Adding Custom Fields to Devise

Before doing anything, please check the versions of the gem files:

gem 'rails', '~> 5.1.4'
gem 'devise', '~> 4.4.0'

Disclaimer - This solution may not work with older versions of rails and devise. Versions listed above were the latest versions of gems which I was using at the time of creation and tests. (10 Jan 2018)

@squarism
squarism / multiline.exs
Last active March 25, 2024 15:27
Multiline Anonymous Functions in Elixir
# Examples of Different Styles and Syntax
# legal / positive case / you can do these stuffs
# ---------------------------------------------------------------------------
# single line, nothing special
Enum.map(0...2, fn i -> IO.puts i end)
"""
0
1