Skip to content

Instantly share code, notes, and snippets.

View jkariscodes's full-sized avatar
🎯
Focusing

Joseph Kariuki jkariscodes

🎯
Focusing
View GitHub Profile
@jkariscodes
jkariscodes / Completely Uninstall LAMP Ubuntu
Last active February 23, 2021 13:53 — forked from UbuntuEvangelist/Completely Uninstall LAMP Ubuntu
Completely Uninstall LAMP Ubuntu 20.04 LTS
#!/bin/bash
# This will remove Apache
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin
sudo apt remove apache2.*
sudo apt-get autoremove
whereis apache2
sudo rm -rf /etc/apache2
@jkariscodes
jkariscodes / Update-branch.md
Created March 21, 2020 10:10 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@jkariscodes
jkariscodes / authenticate.py
Created May 7, 2019 13:19 — forked from femmerling/authenticate.py
I have to create user authentication using python-ldap. After googling around and trying out stuffs, this is the final code for you to use. Please remember to adjust the user_dn, and base_dn accordingly to the format used in your LDAP server.
# to be able to import ldap run pip install python-ldap
import ldap
if __name__ == "__main__":
ldap_server="x.x.x.x"
username = "someuser"
password= "somepassword"
# the following is the user_dn format provided by the ldap server
user_dn = "uid="+username+",ou=someou,dc=somedc,dc=local"
@jkariscodes
jkariscodes / ApiClient.java
Created March 27, 2019 03:45 — forked from haerulmuttaqin/ApiClient.java
Android CRUD Tutorial | • RETROFIT • PHP • MYSQL (https://youtu.be/Vh92eSAEu5c)
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ApiClient {
private static final String BASE_URL = "http://your-domain-name.000webhostapp.com/";
private static Retrofit retrofit;
public static Retrofit getApiClient() {
@jkariscodes
jkariscodes / README-Template.md
Created November 7, 2017 11:31 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jkariscodes
jkariscodes / geonode2.4.x - Install in development mode
Created December 29, 2016 01:27 — forked from okjodom/geonode2.4.x - Install in development mode
this bug when installing geonode 2.4.x, both in dev mode and in admin/deploy mode
(geonode) jdev@linux /home/geonode/dev/geonode $ python manage.py migrate
Not enabling BingMaps base layer as a BING_API_KEY is not defined in local_settings.py file.
Traceback (most recent call last):
File "manage.py", line 28, in <module>
execute_from_command_line(sys.argv)
File "/home/geonode/dev/.venvs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/home/geonode/dev/.venvs/geonode/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/geonode/dev/.venvs/geonode/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv