Skip to content

Instantly share code, notes, and snippets.

⚠️
[object Object]

Harshvardhan Karn harshvkarn

⚠️
[object Object]
Block or report user

Report or block harshvkarn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View twilio-voice.xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Hello World</Say>
</Response>
View gitlab.json
[
{
"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"
},
@harshvkarn
harshvkarn / github-OAuth.php
Last active Feb 8, 2019
Complete PHP 7 code for Implementing OAuth via Github
View github-OAuth.php
<?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(
@harshvkarn
harshvkarn / reverse-words.c
Created Aug 19, 2017
Reverse words from the user inputted string, e.g. Input: Hello world Output: world Hello
View reverse-words.c
#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;
@harshvkarn
harshvkarn / hackers-with-bits.c
Last active Aug 19, 2017
Swapping a digit and printing highest possible subset of 1's in a array containing 0's and 1's
View hackers-with-bits.c
//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++)
You can’t perform that action at this time.