Skip to content

Instantly share code, notes, and snippets.

View AdminDev826's full-sized avatar
🏠
Working from home

AdminDev826

🏠
Working from home
View GitHub Profile
@stungeye
stungeye / aa_rails_5.md
Last active November 17, 2021 17:32
Installing Active Admin With Rails 5

Active Admin and Git Challenge

Let's create a demo app Rails 5 app using Active Admin. We can also practice using git along the way.

  1. Create a new Rails app.
  2. Initialize the Rails app folder as a git repository.
  3. Add and commit the existing Rails app files/folders to your git repo.
  4. Create a new git branch called adding_models
  5. Generate a Category model: rails g model Category name:string
  6. Add and commit using git.
@MohammadaliMirhamed
MohammadaliMirhamed / PhpFireBaseNotificationSample.php
Last active May 28, 2024 11:37
firebase notification sample in php . if you like this code follow me and star it . i will follow you and use your codes and share them . Simple PHP FireBase (FCM) script showing how to send an Android push notification. Be sure to replace the SERVER_API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call
<?php
#API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = $_GET['id'];
#prep the bundle
$msg = array
(
'body' => 'Body Of Notification',
@maxivak
maxivak / Reame.md
Last active October 3, 2021 15:04
using Solr search with Rails app

Using Solr search engine with Sunspot gem in Rails app

Solr search engine

http://lucene.apache.org/solr/

Sunspot

Sunspot - Sunspot is a Ruby library for interaction with the Solr search engine.

@ball-hayden
ball-hayden / README.md
Last active September 21, 2018 09:07
ActiveAdmin Bootstrap

ActiveAdmin Bootstrap

This is a rough proof of concept.

There will be broken things.

Comments are welcome.

Installation

@tadast
tadast / ssl_puma.sh
Last active January 29, 2024 04:41 — forked from trcarden/gist:3295935
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@adactio
adactio / postforms.js
Created March 2, 2014 23:42
Show a progress bar when a form is submitted (and prevent more than one submission per document).
/*
Show a progress element for any form submission via POST.
Prevent the form element from being submitted twice.
*/
(function (win, doc) {
'use strict';
if (!doc.querySelectorAll || !win.addEventListener) {
// doesn't cut the mustard.
return;
}
@prime31
prime31 / gist:5675017
Last active September 9, 2024 04:24
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array