Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

shemul shemul

🎯
Focusing
Block or report user

Report or block shemul

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:638d0ee92aa09d105a32218a7a31033b
# Root.
$ docker exec -u 0 -it {container_id/image_name} bash
or
# Default container's user.
$ docker exec -it {container_id/image_name} bash
@shemul
shemul / gist:decc29cebcd994b5aac07d1db26bd293
Created Nov 20, 2018
Prometheus , node_exporter , grafana docker
View gist:decc29cebcd994b5aac07d1db26bd293
# A scrape configuration scraping a Node Exporter and the Prometheus server
# itself.
scrape_configs:
# Scrape Prometheus itself every 5 seconds.
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
View self_hosted_google_analytics_cron.php
<?
// script to update local version of Google analytics script
// Remote file to download
$remoteFile = 'https://www.google-analytics.com/analytics.js';
$localfile = '/home/refinedseo/domain_name_with_tld/files/local-analytics.js';
//$localfile = '/home/refinedseo/public_html/domain_name_with_tld/wp-content/analytics.js';
//For Cpanel it will be /home/USERNAME/public_html/local-ga.js
// Connection time out
@shemul
shemul / cgpa_predictor.matlab
Created Sep 11, 2016
cgpa predictor analytics using matlab
View cgpa_predictor.matlab
function [trainedClassifier, validationAccuracy] = trainClassifier(trainingData)
% trainClassifier(trainingData)
% returns a trained classifier and its accuracy.
% This code recreates the classification model trained in
% Classification Learner app.
%
% Input:
% trainingData: the training data of same data type as imported
% in the app (table or matrix).
%
@shemul
shemul / pointInACircle.cpp
Created Sep 2, 2015
বৃত্তের ভিতরে বিন্দু ( Point Inside Circle )
View pointInACircle.cpp
/**<
problem : https://algo.codemarshal.org/problems/55184554742a2fff09a42faa
author : shemul
reference : https://www.youtube.com/watch?v=1-Q_BQ0ypmg
*/
#include<iostream>
#include<stdio.h>
@shemul
shemul / password.cpp
Created Aug 29, 2015
password_problem_in_prokriya.cpp
View password.cpp
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include<stdlib.h>
using namespace std;
View gist:5f3c7e8d6d1dc85da57d
package sensor.example;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
@shemul
shemul / db_droid.java
Created Apr 21, 2015
android_database
View db_droid.java
package com.database.project;
import android.app.Activity;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.widget.Toast;
public class DatabaseProjectActivity extends Activity {
View gist:42499ec986b014b61be1
http://www.dreamincode.net/forums/topic/365881-Convert-ASCII-To-Binary/
org 100h
include 'emu8086.inc'
.model small
.stack
View gist:50196437080117c31a8c
.MODEL SMALL
.STACK 100H
.DATA
PROMPT_1 DB 'Enter the character : $'
PROMPT_2 DB 0DH,0AH,'The ASCII code of the given number in binary form is : $'
PROMPT_3 DB 0DH,0AH,'The number of 1 bits in ASCII code are : $'
.CODE
MAIN PROC
You can’t perform that action at this time.