Skip to content

Instantly share code, notes, and snippets.

View pappu687's full-sized avatar

Md. Mahbubur Rahman pappu687

View GitHub Profile
@pappu687
pappu687 / redmine-hostmonster-email-smtp
Created November 12, 2012 13:10
Redmine SMTP Email Config for Hostmonster
#This works for me for a Redmine Install with passenger in Hostmonster.
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
ssl : true
address: "hostXXX.hostmonster.com"
port: '465'
domain: "example.com"
@pappu687
pappu687 / angular-feed-reader
Last active December 25, 2017 16:49
Quick Feed Reader with AngularJS
<!DOCTYPE html>
<html ng-app="RSSFeedApp">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>AngularJS Feed Reader - jsFiddle demo</title>
<script type='text/javascript' src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js'></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css">
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-responsive.min.css">
@pappu687
pappu687 / adminer.css
Last active May 28, 2016 22:28
FLAT UI Flavored Adminer Theme
/*
FLAT UI Flavored Adminer Theme by M. Mahbubur Rahman (mahbub@mahbubblog.com)
Screenshot : http://d.pr/i/cznH
Based on work by : Lukáš Brandejs
https://raw.github.com/vrana/adminer/master/designs/ng9/adminer.css
*/
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600);
* {
@pappu687
pappu687 / 0_reuse_code.js
Created April 14, 2014 15:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pappu687
pappu687 / global-js
Last active August 29, 2015 14:01
JavaScript Global
<html>
<head>
<script src="js-1.js"></script>
<script src="js-2.js"></script>
</head>
<body>
</body>
</html>
https://images.unsplash.com/photo-1448318440207-ef1893eb8ac0
https://images.unsplash.com/photo-1447678523326-1360892abab8
https://images.unsplash.com/photo-1445754574409-bcd715e18017
https://images.unsplash.com/photo-1444682717031-a2498d603d5b
https://images.unsplash.com/photo-1442405740009-7b57cca9d316
https://images.unsplash.com/photo-1439337153520-7082a56a81f4
https://images.unsplash.com/photo-1433832597046-4f10e10ac764
https://images.unsplash.com/photo-1430651717504-ebb9e3e6795e
https://images.unsplash.com/photo-1428190318100-06790c8b2e5a
https://images.unsplash.com/photo-1422504090664-c57eba84293f
@pappu687
pappu687 / country-dropdown-de.txt
Created January 7, 2016 04:59
Country Dropdown in German
<select name="countries">
<option value="DE">Deutschland</option>
<option value="AT">Österreich</option>
<option value="CH">Schweiz</option>
<option value="LU">Luxemburg</option>
<option value="AF">Afghanistan</option>
<option value="EG">Ägypten</option>
<option value="AX">Åland</option>
<option value="AL">Albanien</option>
<option value="DZ">Algerien</option>
@pappu687
pappu687 / my-tmuxifier-layout.sh
Created January 10, 2016 12:33
My Tmuxifier for a Laravel project
window_root "~/Code/Project"
# Create new window. If no argument is given, window name will be based on
# layout file name.
new_window "canon"
# Split window into panes.
split_h 50
split_v 50 1
split_v 50 2
@pappu687
pappu687 / overview-for-angular-apps-with-roles-and-permissions.md
Created May 1, 2016 08:56 — forked from bvaughn/overview-for-angular-apps-with-roles-and-permissions.md
RE: Reddit Angular JS question "Advice on separating the logical parts of an application"

This gist is in response to a question asked on the Reddit Angular JS forum about how to structure an Angular app with roles and permissions.

There are many ways to approach this, but I'll share one that I've used before and maybe it will give you an idea. I'd combine all of the above into a single app and control who gets to see what using permissions. There are a few components to this approach...

A local session service

First off I'd advise creating some sort of local session management service. This should be able to track whether you have an authenticated user and- if so- what types of permissions that user has. (Lots of ways to manage permissions. I'll assume your user object has either a 'role' enum or something simple like an array of string permissions.) You could roll your own session service or you could check out something like satellizer.

Let's assume yo

@pappu687
pappu687 / import.md
Last active February 27, 2023 21:14
How to import large flat text file into mysql table

Import Large flat text file into mysql

Say you have a 1GB text file (words.txt) and has a word each line. Like this

1. John
2. Doe
3. Jane
4. Smith