Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ibreakthecloud's full-sized avatar
⚠️
[object Object]

Harshvardhan Karn ibreakthecloud

⚠️
[object Object]
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Hello World</Say>
</Response>
[
{
"id":"acf6bf5",
"name": "jiva",
"web_url": "https://github.com/openebs/jiva/pull/103",
"build": {
"id": "501",
"status": "success",
"web_url": "https://travis-ci.org/openebs/jiva/builds/414425275?utm_source=github_status&utm_medium=notification"
},
@ibreakthecloud
ibreakthecloud / github-OAuth.php
Last active December 16, 2019 14:51
Complete PHP 7 code for Implementing OAuth via Github
<?php
session_start();
$code = $_GET['code'];
$url = 'https://github.com/login/oauth/access_token';
$client_id = 'xxxxxxxxxxxxxxxxxxxxxxx';
$client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// echo $code;
$postdata = http_build_query(
@ibreakthecloud
ibreakthecloud / reverse-words.c
Created August 19, 2017 02:46
Reverse words from the user inputted string, e.g. Input: Hello world Output: world Hello
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* strev(char str[])
{
int i,j;
char temp[100];
i = 0;
j = strlen(str) - 1;
@ibreakthecloud
ibreakthecloud / hackers-with-bits.c
Last active August 19, 2017 02:42
Swapping a digit and printing highest possible subset of 1's in a array containing 0's and 1's
//Author: Harshvardhan Karn
#include <stdio.h>
main()
{
int a[100],n,i=0,counter=0,z=0,countfwd=0,countbwd=0,max=0,maxpos=0,countedtill=0, maxswap = 0, onecounter = 0;
//taking size of array
scanf("%d",&n);
//taking input for array
for(i=0;i<n;i++)