Skip to content

Instantly share code, notes, and snippets.

View adithya321's full-sized avatar
🏠
Working remotely

Adithya Jayasankar adithya321

🏠
Working remotely
View GitHub Profile
"""Autogenerated input type of AcceptTopicSuggestion"""
input AcceptTopicSuggestionInput {
"""The Node ID of the repository."""
repositoryId: ID!
"""The name of the suggested topic."""
name: String!
"""A unique identifier for the client performing the mutation."""
clientMutationId: String
@tzutalin
tzutalin / build-android-opencv.sh
Last active October 1, 2022 21:18
Build OpenCV for android
#!/usr/bin/env sh
NDK_ROOT="${1:-${NDK_ROOT}}"
if [ ! -d "${WD}/android-cmake" ]; then
echo 'Cloning android-cmake'
git clone https://github.com/taka-no-me/android-cmake.git
fi
### ABI setup
#ANDROID_ABI=${ANDROID_ABI:-"armeabi-v7a with NEON"}
@artem-zinnatullin
artem-zinnatullin / GradleWorkersPleaseStopTakingFocus.gradle
Created July 21, 2015 19:58
Prevent Gradle Workers from taking focus! #DevelopersLikeComfort
// You can place it in the root build.gradle
allprojects {
tasks.withType(JavaForkOptions) {
// Forked processes like GradleWorkerMain for tests won't steal focus!
jvmArgs '-Djava.awt.headless=true'
}
}
@kaushikgopal
kaushikgopal / RoundedBitmapDrawableUsage.java
Last active March 25, 2024 13:55
RoundedImageView - drop dead easy way to do this with RoundedBitmapDrawable
Bitmap batmapBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.batman);
RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getResources(), batmapBitmap);
// option 1 h/t [Chris Banes](https://chris.banes.me/)
circularBitmapDrawable.setCornerRadius(batmapBitmap.getWidth());
// option 2 h/t @csorgod in the comments
circularBitmapDrawable.setCircular(true);
@chandruscm
chandruscm / 2048.cpp
Last active November 21, 2022 12:04
A simple implementation of the popular 2048 puzzle in C++ . Visit http://chandruscm.wordpress.com/2014/10/25/2048-in-c-c/ for code explanation.
#include<iostream>
#include<ctime>
#include<unistd.h>
#include<cstdlib>
#include<cstdio>
#include<cmath>
using namespace std;
int press_enter;
@nbriz
nbriz / leave_facebook.js
Last active October 16, 2018 10:36 — forked from subimage/jquery-2.1.1.min.js
all-in-one script ( with parameters ) >> big thnx to @subimage && xtra updates by Luigi DiGangi
// forked from subimage's modifications of my much messier prior scripts
// ( https://gist.github.com/subimage/d952e49c9184d6a7a74f )
// after entering jquery into ur console, enter the code below in ur console
// then load a few months of activity && enter leaveFacebook(); into ur console
// u can specify parameters like so: leaveFacebook('Unlike'); if u only want to unlike
// or leaveFacebook('Unfriend'); if u only want to unfriend
// etc...
// visit nickbriz.com/facebook for vidz && details
@yujikosuga
yujikosuga / ButtonPref.java
Created September 22, 2011 08:05
Add a button to a PreferenceScreen (Android)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_button);
...
Preference pref = findPreference("sample_key");
pref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
// TODO Auto-generated method stub
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//