Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View atiq1589's full-sized avatar

Md. Atiqul Islam atiq1589

View GitHub Profile
[{"key":"AccountsDisplayDensity","value":false},{"key":"AccountsEmphasizedInflows","value":false},{"key":"AccountsEmphasizedOutflows","value":false},{"key":"AccountsStripedRows","value":false},{"key":"AccountsStripedRowsColor","value":"#fafafa"},{"key":"AccountsStripedRowsDarkColor","value":"#1e1e1f"},{"key":"AutoDistributeSplits","value":false},{"key":"AutoEnableRunningBalance","value":false},{"key":"AutomaticallyMarkAsCleared","value":false},{"key":"BetterScrollbars","value":false},{"key":"BottomNotificationBar","value":false},{"key":"BudgetProgressBars","value":false},{"key":"BulkEditMemo","value":true},{"key":"BulkManagePayees","value":false},{"key":"CalculateIRR","value":false},{"key":"CalendarFirstDay","value":false},{"key":"CategoryActivityCopy","value":false},{"key":"CategoryActivityPopupWidth","value":false},{"key":"ChangeEnterBehavior","value":false},{"key":"ChangeMemoEnterBehavior","value":false},{"key":"CheckCreditBalances","value":false},{"key":"CheckNumbers","value":false},{"key":"ClearSelection
@atiq1589
atiq1589 / utility.js
Last active September 24, 2019 01:15
javascript utility functions
// Do not user fat arrow function
const print = function (){
console.log(...[...arguments]);
}
@atiq1589
atiq1589 / github_gpg_key.md
Created March 24, 2019 06:12 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@atiq1589
atiq1589 / hdd_resize
Created June 20, 2018 07:00
VertualBox
VBoxManage.exe modifymedium path\to\hdd.vdi --resize {size_in_mb}

Nodejs

heroku buildpacks:add heroku/nodejs

@atiq1589
atiq1589 / diable_uac_for_certain_app.md
Last active May 15, 2018 13:09
Disable User Account Control for certain applications only

While you should not disable the UAC prompts for the whole computer, you may want to disable it for certain applications. Using the Microsoft Application Compatibility Toolkit and following the steps below, you can disable the UAC prompts for one or more specific applications which you trust. This will NOT disable the User Account Control feature for the whole computer.

  1. Create a system restore point first.
  2. Download and install the Microsoft Application Compatibility Toolkit 5.0. (https://www.microsoft.com/en-us/download/details.aspx?id=7352)
  3. In the Start menu, locate the new folder. Find the shortcut icon for Compatibility Administrator. Right click it and click Run as administrator.
  4. In the left-hand pane, right-click on the database under Custom Databases and select Create New, and select Application Fix.
  5. Enter the name and other details of the application you want to alter behavior on and then browse to it to select it. Click Next.
  6. Click Next until you are in the Compatibility Fixes scre
@atiq1589
atiq1589 / file.sql
Last active March 14, 2018 12:06
How to stop/kill a query in postgresql
-- To check the active activity
select * from pg_stat_activity where state = 'active';
-- To cancle an activity
select pg_cancel_backend(<pid of the process>)
-- To Terminate an activity
select pg_terminate_backend(<pid of the process>)
@atiq1589
atiq1589 / controller.js
Last active February 25, 2018 07:51
Getting angularjs controller and scope from outside angularjs
var controller = angular.element("[ng-controller='ControllerName']");
var scope = controller.scope();
@atiq1589
atiq1589 / factorial.js
Created January 28, 2018 06:33
Memoization Or caching data without global variable in Javascript.
fact = (function(){
var memo = {};
function clousre(n){
console.log(n);
if (n == 0 || n == 1)
return 1;
if (n in memo)
return memo[n];
memo[n] = n * clousre(n - 1);
return memo[n];
@atiq1589
atiq1589 / angular-post.js
Last active January 23, 2018 11:32
Create CSV and upload it to server with AngularJs
function Post(url, data, options) {
var deferred = $q.defer();
$http.post(url, data, options)
.success(function(res) {
deferred.resolve(res);
}).error(function(error, status) {
deferred.reject({ error: error, status: status });
});
return deferred.promise;
}