Skip to content

Instantly share code, notes, and snippets.

View AnwarShah's full-sized avatar

Anwar AnwarShah

View GitHub Profile
@AnwarShah
AnwarShah / ppas.list
Created April 20, 2017 06:21
My Xenial Xerus 16.04 PPA list
deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /
deb http://ppa.launchpad.net/docky-core/stable/ubuntu xenial main
deb http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
deb http://ppa.launchpad.net/embrosyn/cinnamon/ubuntu xenial main
deb http://ppa.launchpad.net/fontforge/fontforge/ubuntu xenial main
deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu xenial main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
deb https://cli-assets.heroku.com/branches/stable/apt ./
@AnwarShah
AnwarShah / jdk_download.sh
Created April 12, 2017 16:14 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@AnwarShah
AnwarShah / rspec_rails_cheetsheet.rb
Created February 21, 2017 19:35 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)

Keybase proof

I hereby claim:

  • I am anwarshah on github.
  • I am anwarshah (https://keybase.io/anwarshah) on keybase.
  • I have a public key ASBBr4h6EKDnzwzcJUkkHVgDv8Ar1V57hf0zlJ0oUo1KsAo

To claim this, I am signing this object:

@AnwarShah
AnwarShah / gui-for-shell
Created October 25, 2016 10:22
shell gui
Bash is a Shell. A shell is a command-line interpreter, an interface for you to call other programs/commands. That's why it is called **Command Line Interface** or CLI. So, a shell scripting language provides constructs that facilitates this interaction only, but never provides GUI tools to build graphical interface. It's not a full-fledge language with its own graphical components. You can use these shells to call other CLI tools (most commonly) and sometimes a GUI tool (like [zenity][1]).
Since Shells never provide gui building support, there can be no question of having a GUI building tool for them.
Yes, as I already said, you can use [zenity][1] and other similar tools to bring GUI components, but those are third party libraries called from bash, not bash things themselves (Zenity is a GNOME tool).
Check the answer to a similar [question here][2] on [unix.se]. Also check this question on Stack overflow
- [How to make a GUI for bash scripts?][3]
Elementary and Ubuntu are different distributions. The projects are different. The goals are different. There are lots of other differences between them. Elementary is based on Ubuntu, but it is _Ubuntu_. It's also not an **Ubuntu-flavor** (like Lubuntu, Xubuntu, Kubuntu, Ubuntu MATE, Ubuntu GNOME etc), but an **Ubuntu-based distribution**.
Ubuntu flavors dists are basically Ubuntu, featuring different desktop environment. If you want to know whether it is only the desktop environment that is different from Lubuntu to Ubuntu, then you may find answers to that part from this question
- http://askubuntu.com/questions/793886/how-does-ubuntu-flavor-iso-differ-from-a-desktop-package
> And lastly, if I have Elementary OS installed, is it possible to get updates from the latest Ubuntu repository?
That depends on how Elementary is set up. Elementary has lots of packages modified with their own patches. And a distribution will have its own repositories. So it's more likely that even if they use Ubuntu repository a
@AnwarShah
AnwarShah / usr.bin.atom-beta
Created October 15, 2016 14:52
apparmor profile for atom-beta to restrict internet access
# Last Modified: Sat Oct 15 20:12:41 2016
#include <tunables/global>
/usr/bin/atom-beta flags=(complain) {
#include <abstractions/base>
#include <abstractions/bash>
deny network inet dgram,
deny network inet stream,
deny network netlink raw,
@AnwarShah
AnwarShah / usr.share.atom-beta.resources.app.apm.bin.apm
Created October 15, 2016 14:50
apparmor profile for apm of atom-beta
#include <tunables/global>
/usr/share/atom-beta/resources/app/apm/bin/apm {
#include <abstractions/base>
#include <abstractions/bash>
deny network inet dgram,
deny network inet stream,
deny network netlink raw,
Question link http://askubuntu.com/questions/805472/unity-desktop-x-windows-not-visible-after-upgrade-to-16-04-lts-from-14-04-lts
Comment to paste errors
@AnwarShah
AnwarShah / 99_mysettings
Created May 7, 2016 13:33
My Customized apt-config
APT::Get::List-Cleanup false;
Acquire::Languages "none";