Posts

Showing posts matching the search for server

Host shiny server in Ubuntu 14.04 LTS

Image
I have installed shiny server on Ubuntu 14.04 LTS running under a VM. This post is a collection of commands that I had used for setup. Note that if you want to use shiny server on LAN then use Bridged Network Adapter. On VM you can access the shiny server via localhost:3838 and on remote machines, you can use IP-address:3838 to open it. You can host your shiny app in the /srv/shiny-server/ directory. You can go to /etc/shiny-server/shiny-server.conf to change default configurations like you can change port with listen <port number>; in server {} module. $ sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' $ sudo gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 $ sudo gpg -a --export E084DAB9 | sudo apt-key add - $ sudo apt-get update $ sudo apt-get -y install r-base $ sudo su - -c "R -e \"install.packages(c('shiny','shinyjs','shinydashboard','...

Configuring TACACS+ in GNS3 and Packet Tracer

Image
GNS3: Step 1: Check connectivity between router in GNS3 and Kali linux in Virtualbox. IP of Kali linux (TACACS+ server) is 192.168.56.101 and of router (TACACS+ client) is 192.168.56.1. Step 2: Install TACACS+ in Kali linux. apt-get install tacacs+

[Solved] Fix upgrade errors in Kali Linux

Image
If you face errors from powershell-empire while upgrading Kali Linux, upgrade the pip packages for Flask and aiohttp with root privileges. Error - 1: Traceback (most recent call last):   File "/usr/share/powershell-empire/empire.py", line 11, in <module>     import empire.server.server as server   File "/usr/share/powershell-empire/empire/server/server.py", line 23, in <module>     import flask   File "/usr/lib/python3/dist-packages/flask/__init__.py", line 19, in <module>     from . import json   File "/usr/lib/python3/dist-packages/flask/json/__init__.py", line 15, in <module>     from itsdangerous import json as _json ImportError: cannot import name 'json' from 'itsdangerous' (/usr/lib/python3/dist-packages/itsdangerous/__init__.py) dpkg: error processing package powershell-empire (--configure):  installed powershell-empire package post-installation script subprocess returned error exit status...

Run a server from Node.js

Image
Step 1: Download and install Node.js from https://nodejs.org/en/ Step 2: Launch node from command prompt and verify it has installed correctly Step 3: Create a new file server.js as follows: var http = require('http'); var fs = require('fs'); var url = require('url'); http.createServer( function (request, response) {    var pathname = url.parse(request.url).pathname;    fs.readFile(pathname.substr(1), function (err, data)    {       if (err)       {          console.log(err);          response.writeHead(404, {'Content-Type': 'text/html'});          response.write(err.toString());       }

[How To] Run Jupyter Lab from a Remote server

Image
Step 1: Launch Jupyter Lab from the Remote server with the command $ jupyter-lab --no-browser --ip="0.0.0.0" [I 2022-11-24 15:03:36.648 ServerApp] jupyterlab | extension was successfully linked. [I 2022-11-24 15:03:36.711 ServerApp] nbclassic | extension was successfully linked. [I 2022-11-24 15:03:37.783 ServerApp] notebook_shim | extension was successfully linked. [I 2022-11-24 15:03:37.910 ServerApp] notebook_shim | extension was successfully loaded. [I 2022-11-24 15:03:37.917 LabApp] JupyterLab extension loaded from /home/pi/.local/lib/python3.9/site-packages/jupyterlab [I 2022-11-24 15:03:37.917 LabApp] JupyterLab application directory is /home/pi/.local/share/jupyter/lab [I 2022-11-24 15:03:37.941 ServerApp] jupyterlab | extension was successfully loaded. [I 2022-11-24 15:03:37.963 ServerApp] nbclassic | extension was successfully loaded. [I 2022-11-24 15:03:37.965 ServerApp] Serving notebooks from local directory: /home/pi/Documents Step 2: Open a browser window from y...

Free VPN Service for Router

Image
What is a Virtual Private Network (VPN)? A virtual private network extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network. Why have a VPN? A VPN, or virtual private network, is a secure tunnel between two or more devices. VPNs are used to protect private web traffic from snooping, interference, and censorship. Virtually anyone can benefit from VPN, whether it is to access content outside of your territory, protect your private information, or get access to cheap airfares. There are many attributes that must be considered when choosing a VPN as well; not all VPNs were created equal. There are two basic VPN types: 1. Remote Access VPN 2. Site – to – Site VPN Types of VPN protocols: The above two VPN types are based on different VPN security protocols. Each of these VPN protocols offers different features and le...

Free VPN Service for Device

Image
Learn more about VPN and PPTP: https://com.puter.tips/2018/09/free-vpn-service-for-router.html OSI model layers The main concept of OSI is that the process of communication between two endpoints in a network can be divided into seven distinct groups of related functions, or layers. Each communicating user or program is on a device that can provide those seven layers of function. In this architecture, each layer serves the layer above it and, in turn, is served by the layer below it. So, in a given message between users, there will be a flow of data down through the layers in the source computer, across the network, and then up through the layers in the receiving computer. The seven layers of function are provided by a combination of applications, operating systems, network card device drivers and networking hardware that enable a system to transmit a signal over a network Ethernet or fiber optic cable or through Wi-Fi or other wireless protocols. Data Link (Layer 2)...

Create HTML dashboard of Jenkins jobs status

Image
Perl script to fetch live jobs' status from Jenkins server and generate and display HTML dashboard from it. use strict; use warnings; use autodie; use REST::Client; use MIME::Base64; use JSON; my $api_proto = 'http';               #HTTP/HTTPS my $api_url = 'localhost';       #Server IP my $api_port = '8080';                #Port number my $api_user = 'admin';           #Jenkins account username my $api_pass = 'password';          #Jenkins account password my $client = REST::Client->new();    #Perl Rest Client Object $client->addHeader('Authorization', 'Basic '.encode_base64($api_user . ':' . $api_pass)); $client->GET($api_proto.'://'.$api_url.':'.$api_port.'/api/json?tree=jobs[name,color,url]'); my $html = ""; $html = $ht...

Getting up and running with Jenkins 2.60.3 on Windows [How to solve Error: no workspace]

Image
Jenkins: The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. Jenkins is a Continuous Integration server. Basically Continuous Integration is the practice of running your tests on a non-developer machine automatically every-time someone pushes new code into the source repository. Prerequisites: Java Development Kit (JDK) Java Run-time Environment (JRE) To install JDK go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html To install JRE go to http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Plot histogram in RStudio using Shiny

Image
CODE: # '#' denotes a comment # install.packages("UsingR") uncomment if package is not installed library (UsingR) # install.packages("shiny") uncomment if package is not installed library (shiny) # install.packages("Hmisc") uncomment if package is not installed library (Hmisc) # install.packages("corrplot") uncomment if package is not installed library (corrplot) # getwd() gives the current directory where R looks up for files wd <- getwd() setwd(wd)

Jenkins: Trigger build remotely via script using Authentication Token

Image
Powershell: $acctname = "admin" $password = "password" $server = "localhost" $port = "8080" $jobName = "test02" $jobToken = "test02_authentication_token" $params = @{uri = "http://${server}:${port}/job/${jobName}/build?token=${jobToken}";             Method = 'Get';             Headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$(${acctname}):$(${password})"));}} Invoke-RestMethod @params

5.5.1 Authentication Error in Gmail

Image
Code for sending email using gmail in C# : using System.Net.Mail; using System.Net; MailMessage mail = new MailMessage(); mail.To.Add("dummy@test.com"); mail.From = new MailAddress("dummy-sender@gmail.com"); mail.Subject = "subject"; mail.SubjectEncoding = System.Text.Encoding.UTF8; mail.Body = "foo foo bar"; mail.Priority = MailPriority.High; SmtpClient client = new SmtpClient(); client.UseDefaultCredentials = false; client.Credentials = new NetworkCredential("dummy-sender@gmail.com", "gmail-password"); client.Port = 587; client.Host = "smtp.gmail.com"; client.EnableSsl = true; client.Send(mail); Error: "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required" Solution: Login to your gmail account from which you are trying to send email and then go to https://www.google.com/settings/security/lesss...

[Solved] code signature not valid for use in process using Library Validation

Image
So I was working on a C++ project on Xcode, and I updated to the latest version of Xcode with recommended default settings; then I started having the following errors: dyld: Library not loaded: /usr/local/lib/libcryptopp.dylib    Referenced from: /Users/devharsh/Library/Developer/Xcode/DerivedData/server-bohvcuztzndrrzhcoglrvuijfasj/Build/Products/Debug/server    Reason: no suitable image found.    Did find: /usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. /usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not vali...

Where to Publish Your Research for Free: One Platform per Content Type

Image
When you want to share your research with the world for free, the trick is matching each type of output to the platform built for it. Posting a dataset to a preprint server, or a manuscript to a code host, only makes your work harder to find and cite. Here is a simple map: one well-established, free, public platform for each kind of academic content. Free Platforms for Public Academic Content One go-to tool for each type of research output arXiv Preprints — un-reviewed manuscripts Zenodo Datasets — raw research data ResearchGate Academic papers — author PDFs PubPub Open journals — academic HTML & rich text Figshare Supplementary media — figures & charts GitHub Research software — code & scripts OSF Study protocols — pre-registrations Protocols.io Lab methodologies — step-by-step recipes Wikiversity Open courseware — lecture notes & slides DSpace Institutional output — theses & dissertations Eve...

Active Directory login in GitBlit

Image
What is Git? Git is a version control system that is used for software development and other version control tasks. As a distributed revision control system it is aimed at speed, data integrity, and support for distributed, non-linear workflows. Git was created by Linus Torvalds in 2005 for the development of the Linux kernel, with other kernel developers contributing to its initial development. Read more about Git: https://en.wikipedia.org/wiki/Git_(software) What is GitBlit? Gitblit is an open-source, pure Java stack for managing, viewing, and serving Git repositories. It's designed primarily as a tool for small workgroups who want to host centralized repositories. Read more about GitBlit: http://gitblit.com/

Input string was not in a correct format in ASP.NET/C#

Image
ERROR:   Server Error in '/' Application. Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: Input string was not in a correct format. Source Error: Line 31:         int ppi = Convert.ToInt32(Text1.Text); SOLUTION: I tried to change int ppi = Convert.ToInt32(Text1.Text); statement to int ppi = int.Parse(Text1.Text); and int ppi = Int32.Parse(Text1.Text); and int ppi = Int16.Parse(Text1.Text); but it didn't work. The reason was I was using a float value and parsing into an integer one, so I change the erroneous statement to the following, and it worked: float ppi =  float.Parse(Text1.Text);

Free VPN Service for Android

Image
Learn more about VPN, VPN types, VPN protocols and free VPN servers: https://com.puter.tips/search/label/VPN You can set up a PPTP server or an L2TP/IPsec connection on Android as shown in the previous articles or you can use a TOR enabled android app as described in this article. What is Tor? Tor is free software for enabling anonymous communication and an open network that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. The name is derived from an acronym for the original software project name "The Onion Router". Tor on Android Tor is available for Android by installing our package named Orbot. Orbot is an application that allows mobile phone users to access the web, instant messaging and email without being monitored or blocked by their mobile internet service provider. Orbot brings the features and function...

Full (MEAN) Stack Developer Tutorials

Image
Full Stack Development: The term full-stack means developers who are comfortable working with both back-end and front-end technologies. To be more specific, it means that the developer can work with databases, PHP, HTML, CSS, JavaScript and everything in between, also, venturing as far as converting Photoshop designs to front-end code. (Ref.: https://www.sitepoint.com/full-stack-developer/ ) MEAN Stack: MEAN is a framework for an easy starting point with MongoDB, Node.js, Express, and AngularJS based applications. It is designed to give you a quick and organized way to start developing MEAN based web apps with useful modules like Mongoose and Passport pre-bundled and configured. We mainly try to take care of the connection points between existing popular frameworks and solve common integration problems. (Ref.: http://learn.mean.io/ ) Online Certification Courses (MOOCs) and Tutorials: https://www.udacity.com/course/full-stack-web-developer-nanodegree--nd004 h...

[How to] Redirect URL in WordPress

Image
In this tutorial, I will walk you through redirecting a URL in WordPress without using any plugins. You can open a Terminal or Command Prompt window and do the following: $cd to /var/www/html $ls -loa $sudo nano .htaccess Append to the end of file “Redirect 301 old-URL new-URL” Save the file and exit $sudo service apache2 restart This tutorial redirects a URL in WordPress without a plugin by adding a Redirect 301 rule to the site's .htaccess file on an Apache server. A 301 tells browsers and search engines that the move is permanent. Editing .htaccess directly is lightweight and avoids extra plugins, but keep a backup, since a syntax mistake there can take the site down until it is corrected.

Install Redis in Kali Linux

Image
Redis: Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. Step 1: sudo apt-get update sudo apt-get install build-essential sudo apt-get install tcl8.5 wget http://download.redis.io/releases/redis-3.0.0.tar.gz tar xzf redis-3.0.0.tar.gz