Skip to content

Instantly share code, notes, and snippets.

View maateen's full-sized avatar
:octocat:
Alive & Breathing!

Maksudur Rahman Maateen maateen

:octocat:
Alive & Breathing!
View GitHub Profile
@maateen
maateen / ReactApp.jsx
Created January 12, 2017 13:54 — forked from jeanlescure/ReactApp.jsx
Using Semantic UI Modal in a React.js App
var HelloModal = React.createClass({
getInitialState: function() {
return {
visible: false
};
},
componentDidMount: function() {
var self = this;
$(window).on('modal.visible', function(ev){
self.setState({visible: true});
@maateen
maateen / multiple-modals-semantic.html
Created January 12, 2017 13:53 — forked from marcosfreitas/multiple-modals-semantic.html
Creating Multiple Modals in Semantic UI :)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Multiple Modals With Semantic UI</title>
<link rel="stylesheet" href="path_to_semantic/dist/semantic.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="path_to_semantic/dist/semantic.js"></script>
</head>
<body>
@maateen
maateen / servers.py
Last active December 20, 2016 22:16
Hello Sysadmin, make life easier on Terminal. :)
"""
Documentation
1. At first, save the entire script as servers.py in /home/your-username/ directory.
Also you can simply use the below command:
curl "https://gist.githubusercontent.com/maateen/1582a28d62437caaf5cf9098303bab79/raw/e216b3b1ff8f1323fb79de4ae5a4c5b24a8b2c4d/servers.py" > ~/servers.py
2. Change info in servers = {} portion according to your need.
Always use Server Identity at the left side of : sign and SSH Login Command at the right side.
@maateen
maateen / bashrc
Created September 21, 2016 17:24
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l | grep "The agent has no identities" && ssh-add
@maateen
maateen / TLP config file
Last active February 4, 2025 12:18
All TLP settings are stored in the config file /etc/default/tlp. The default configuration provides optimized power saving out of the box. Some advanced features like turning off the optical drive and battery thresholds need to be activated explicitly. The config file can be changed with any text editor (root privilege is needed). For more: http…
# ------------------------------------------------------------------------------
# tlp - Parameters for power save
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
TLP_ENABLE=1
@maateen
maateen / cellular-tax-calc.py
Created August 30, 2016 10:58
This will take a float number as input and show the total number with tax. (Bangladesh)
#/usr/bin/python3
print("Press 'Ctrl+C' to exit this tool.")
try:
while True:
print("\nPlease input price in BDT: ")
a = float(input())
b=a+((a*5)/100)
c=b+((b*15)/100)
d=c+((a*1)/100)
Add this to your ~/.bashrc:
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l | grep "The agent has no identities" && ssh-add
Source: http://unix.stackexchange.com/a/217223/109606