Skip to content

Instantly share code, notes, and snippets.

View zeerorg's full-sized avatar
💻
Fixing 🔄 Breaking

Rishabh Gupta zeerorg

💻
Fixing 🔄 Breaking
View GitHub Profile
@zeerorg
zeerorg / sort_files.py
Created August 1, 2016 06:21
Sort files with extensions
import os
import sys
import shutil
def join_path(*arg):
return os.path.join(current_path, *arg)
current_path = os.getcwd()
files = [ f for f in os.listdir(current_path) if\
os.path.isfile(os.path.join(current_path, f)) and f != "sort_files.py" ]
@zeerorg
zeerorg / play_down.py
Last active August 1, 2016 06:24
Uninterrupted youtube playlist download
import subprocess
import os
output_file = '%(playlist_index)s - %(title)s.%(ext)s' # do not change this
link = '' # replace with url of playlist
start_playlist = 1
number = 1
files = [ f for f in os.listdir(".") ]
for f in files:
#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
class strtype
{
private:
char* str;

#ToImTo Android app for all your movie thirst. Reviews, ratings, upcoming movies, popular picks all at one place..

Process.h

#include <iostream>
#define MAX 100

using namespace std;

struct Process {
    int pid;
    int arrival;
@zeerorg
zeerorg / cg_file.md
Last active September 13, 2017 14:18
CG File

Practical 1

Aim

To write a program which draws line using the provided function.

Description of aim and related theory

Communicating with graphics hardware and display is a daunting task. To tackle this operating systems provide graphics library which have a simple API which provide different functions for common tasks (like drawing pixel, line, triangles etc.).
In this practical we are using a standard graphics api (graphics.h or opengl) to understand how a graphics library works and helps us in writing graphics programs.

role client(
A, B : agent, H, PRF, KeyGen: hash_func, V: text,
Ka,Ks, KaikA,Kca: public_key,
%% Ks is the public key of a T3P (ie. CA)
SND, RCV: channel (dy)
)
played_by A
def=
local Na, Nb, Sid, Pa, Nw: text,
State: nat,
  1. title
  2. body
  3. uid
  4. imageList ( no need for single image )
  5. fileList
  6. timestamp
  7. previousPost ( for linking )

    Won't be having:
    authorImage since it should be fetched from specific author repo

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@zeerorg
zeerorg / update_cloudflare_dns.py
Created January 5, 2019 14:22
Effectively use cloudflare as dynamic dns provider
#!/usr/bin/python3
import json
import urllib.request
authkey = ''
email = ''
zone_id = ''
dns_id = ''
my_ip = urllib.request.urlopen('https://api.ipify.org').read().decode('utf-8')