Skip to content

Instantly share code, notes, and snippets.

View purplecandy's full-sized avatar

Nadeem Siddique purplecandy

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Tribute Page</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
@purplecandy
purplecandy / syntax.sql
Last active December 17, 2018 05:00
Learn SQL syntax gist
CREATE TABLE tableName(
column_name data_type,
column_name data_type
);
@purplecandy
purplecandy / create.sql
Created December 17, 2018 05:09
Learn SQL Create
CREATE TABLE students(
id INTEGER,
name TEXT,
age INTEGER
);
INSERT INTO students(id,name,age) VALUES (1,'Nadeem',19);
@purplecandy
purplecandy / tmdb.rb
Created April 24, 2019 11:37 — forked from rectifyer/tmdb.rb
Get images from TMDB
require 'httparty'
# TMDB
TMDB_API_KEY = '[your api key]'
# get configuration parameters
response = HTTParty.get("https://api.themoviedb.org/3/configuration?api_key=#{TMDB_API_KEY}")
config = JSON.parse(response.body)
image_prefix = config['images']['secure_base_url']
@purplecandy
purplecandy / index.html
Last active May 10, 2019 15:35
Input test
<!-- Copyright 2015 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Listening to input</h2>
<br>
<p>Enter text to echo:</p>
@purplecandy
purplecandy / solution.py
Created January 28, 2020 13:51
LeetCode: Add Two Numbers
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
# traversing both nodes together and adding the last digit if carry is generated
pnode = result = ListNode(None)
@purplecandy
purplecandy / lift.c
Created February 6, 2020 17:52
ES lift practical code
#include<reg51.h>
int floor[] = {0x80,0x40,0x20,0x10,0x08,0x04,0x02};
unsigned int curr = 0;
sbit gd = P1^3;
sbit f = P1^2;
sbit s = P1^1;
sbit t = P1^0;
void delay()
@purplecandy
purplecandy / MatrixDemo.java
Created February 11, 2020 11:30
practical 6B
import java.io.*;
import java.util.Scanner;
class MatrixDemo {
final int r,c;
int i=0,j=0;
int ip1[][];
int ip2[][];
int op[][];
@purplecandy
purplecandy / asynco.dart
Created April 7, 2020 09:51
Dart async/await operation
void main(){
results();
}
void results()async{
await printNumber("A",100);
printNumber("B",200);
}
Future<void> printNumber(var a,int delay)async{