Skip to content

Instantly share code, notes, and snippets.

View mraza007's full-sized avatar
:shipit:
Hi :)

Muhammad mraza007

:shipit:
Hi :)
View GitHub Profile
@mraza007
mraza007 / A simple graph
Created July 23, 2018 22:03
This is a simple graph that use TeX pgfplots package
\documentclass[]{standalone}
\usepackage{xcolor}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ytick={0,1,2,3,4,5,6,7,8,9,10},yticklabels={$0$,$1$,$2$,$3$,$4$,$5$,$6$,$7$,$8$,$9$,$10$},ylabel={$KWH$}, xtick={0,1,2,3,4,5,6,7,8,9,10},xticklabels={$0$,$1$,$2$,$3$,$4$,$5$,$6$,$7$,$8$,$9$,$10$},xlabel={$Timer$}]
\addplot[smooth, mark=*] coordinates {(0,0)
(1,6)
(1.5,6)
(2,3)
@mraza007
mraza007 / commands.md
Created September 26, 2018 17:46
This gist will contain all the postgres commands that I use on daily basis.

Postgres Useful Commands

@mraza007
mraza007 / pgsql.md
Last active September 26, 2018 19:05
Postgres Useful Commands

Postgres useful commands

  • psql db_name Connecting to Database
  • \df+ View tables
  • \du View users
  • \q: Quit/Exit
  • \c __database__: Connect to a database
  • \d __table__: Show table definition including triggers
  • \l: List databases
  • \dy: List events
  • \df: List functions
#include <stdio.h>
#include <stdlib.h>
int main(){
FILE *fPointer;
fPointer = fopen("Hello.txt","r");
char singleLine[150];
while(!feof(fPointer)){
fgets(singleLine,150,fPointer);
puts(singleLine);
use std::env;
use std::fs;
fn main() {
// --snip--
println!("In file {}", "Hello.txt");
let contents = fs::read_to_string("Hello.txt")
.expect("Something went wrong reading the file");
#include <stdio.h>
int main()
{
int num;
int squares;
int count;
// for loop terminates when n is less than count
for(count = 0; count < 1000000; count++)
{
#include<iostream>
using namespace std;
int main(){
for(int i=0; i<1000000; i++){
cout << i*i << endl;
}
}
@mraza007
mraza007 / frontendDevlopmentBookmarks.md
Created January 8, 2019 18:48 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@mraza007
mraza007 / Cliref.md
Created April 8, 2019 20:59 — forked from yunga/Cliref.md
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     yunga.palatino@gmail.com
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

@mraza007
mraza007 / npm-commands.md
Created May 22, 2019 09:31 — forked from ankurk91/npm-commands.md
Useful npm commands and tricks

npm v3.10 - ◾

⚠️ This gist is outdated, but most of the commands are still relevant.

Update npm itself

npm install -g npm
# Downgrade to a specific version
npm install -g npm@2