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
@jayperryworks
jayperryworks / .nvmrc
Created January 26, 2021 17:53
Fetch API data with node.js
14.15.3

Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
@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
@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)

@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
@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> -->

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
@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
@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">
@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>",