Skip to content

Instantly share code, notes, and snippets.

View MbuguaCaleb's full-sized avatar
🏠
Bsc Electronic and Computer Engineering (Above all Born Again. Romans 13:11 )

Mbugua Caleb MbuguaCaleb

🏠
Bsc Electronic and Computer Engineering (Above all Born Again. Romans 13:11 )
View GitHub Profile
SELECT id, name, display_name, description, created_at, updated_at
FROM unittrust.um_permissions;
SELECT Max(id)FROM unittrust.um_permissions;
SELECT *FROM unittrust.um_permissions
WHERE name LIKE '%system-modules%';
ALTER SEQUENCE um_mod_permissions_id_seq RESTART WITH 1;
ALTER SEQUENCE um_permissions_id_seq RESTART WITH 1;
SET search_path TO unittrust;
ALTER SEQUENCE um_counties_id_seq RESTART WITH 1
CREATE SEQUENCE um_banks_id_seq START 1;
(a)pip install virtual env
(b)virtualenv myenv
(c)source myenv/bin/activate
Pylint setup
{
@MbuguaCaleb
MbuguaCaleb / .java
Last active February 17, 2021 13:28
Java Fundamentals
//Strings
package com.caleb;
public class Main {
public static void main(String[] args) {
String hello =" CALEB" + "MBUGUA!! ";
//Concat strings
//String is a class therefore it has methods we canbe able to access.
System.out.println(hello.toLowerCase());
@MbuguaCaleb
MbuguaCaleb / csharp_fundamentals.cs
Last active February 17, 2021 03:15
Fundamentals of the C# Programming Language.
#Strings and String Methods.
using System;
namespace csharp_one
{
class Program
{
static void Main(string[] args)
{
-- What is the result?
SELECT MAX(id) FROM your_table;
-- Then run...
-- This should be higher than the last result.
SELECT nextval('your_table_id_seq');
-- If it's not higher... run this set the sequence last to your highest id.
-- (wise to run a quick pg_dump first...)
@MbuguaCaleb
MbuguaCaleb / beginning HTML.txt
Last active September 7, 2020 18:16
The Internet
(a)Internet is a global network of computers.
(b)Each Commputer/Router has an IP address (which is unique to it)Remeber the concept of public and private IP address..(in a local
network computers in the same network each have a unique private IP address)
(c)Computers talk to each other using the TCP/IP protocal.
(d)HTTP handles web traffic (request/response)
(e)DNS is used to Map IP addresses to domain names.
void main() {
/*Map is a set of key value pairs similar to
* object literals in javascript and dictionaries in
* python
*
*/
Map student ={
'name':"Mbugua Caleb","age":"24"
};
@MbuguaCaleb
MbuguaCaleb / main.dart
Created August 12, 2020 09:35
Dart Primer tutorial by Net Ninja on the basics of dart
void main() {
//Instantiating a class
User userOne=User('caleb', 24);
//calling an attribute/property of the class
print(userOne.username);
print(userOne.age);
User userTwo = User('mercy',23);
@MbuguaCaleb
MbuguaCaleb / SSH GIST
Last active March 18, 2021 10:24
A GIST FOR SSH
Private and Public Keys
Gaining access to a remote server
1)It is SSH-Secure Shell Protocol to communicate with other computers .It is similar to Protocals like https,hhtp and ftp)
2)Do just anything in the remote Computer (Make files,,,etc)
3)Traffic is Encrypted while using ssh..Used Mostly in Terminal/Commandline..Can also be used in GUI EG SCP...ALSO WITH FTP CLIENTS
Like filezilla