Skip to content

Instantly share code, notes, and snippets.

@menuka94
menuka94 / fix-nautilus.sh
Last active August 18, 2018 18:01 — forked from jiromm/gist:ce628934a90433c56252
Linux Commands
# Find the process IDs
ps awx | grep nautilus
# Then kill it
sudo kill -TERM <id>
@menuka94
menuka94 / vue-data-binding-1.html
Last active May 12, 2018 18:52
VueJS Snippets
<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
@menuka94
menuka94 / main.sh
Last active March 31, 2018 10:41
Python Virtual Environments
# 'env' => name of the environment
virtualenv tempEnv
# or, for python3
virtualenv -p python3 tempEnv
# activate the created enviroment
source tempEnv/bin/activate
# execute commands on the activated environment
@menuka94
menuka94 / bootstrap-iso.css
Created March 9, 2018 14:49
Bootstrap CSS with Namepspace Wrapper
.bootstrap {
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.3/customize/?id=781848977ca0d1ac6d8cccbf4e88134f)
* Config saved to config.json and https://gist.github.com/781848977ca0d1ac6d8cccbf4e88134f
*/
let webpack = require('webpack');
let path = require('path');
module.exports = {
entry: {
app: './resources/assets/js/app.js',
vendor: ['vue', 'axios']
},
output: {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
@menuka94
menuka94 / MainActivity.java
Created March 3, 2017 09:01
Android Firebase Authentication
// Firebase instance variables
private FirebaseAuth mFirebaseAuth;
private FirebaseUser mFirebaseUser;
private String mUsername;
private String mPhotoUrl;
@Override
protected void onCreate(Bundle savedInstanceState){
// Initialize Firebase Auth
mFirebaseAuth = FirebaseAuth.getInstance();
@menuka94
menuka94 / Commit Formatting.md
Created November 11, 2017 10:44 — forked from brianclements/Commit Formatting.md
Angular Commit Format Reference Sheet

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the AngularJS change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

@menuka94
menuka94 / .travis.yml
Created October 13, 2017 08:33 — forked from ryboe/.travis.yml
Example .travis.yml for Golang
language: go
# Only the last two Go releases are supported by the Go team with security
# updates. Any versions older than that should be considered deprecated.
# Don't bother testing with them. tip builds your code with the latest
# development version of Go. This can warn you that your code will break
# in the next version of Go. Don't worry! Later we declare that test runs
# are allowed to fail on Go tip.
go:
- 1.7
@menuka94
menuka94 / vscode-user-settings.json
Last active October 8, 2017 06:47
Visual Studio Code Settings
{
"vim.disableAnnoyingNeovimMessage": true,
"editor.fontSize": 18,
"editor.fontFamily": "Ubuntu Mono",
"window.zoomLevel": 1,
"vim.useCtrlKeys": false,
"workbench.startupEditor": "newUntitledFile",
"files.autoSave": "onFocusChange"
}