Skip to content

Instantly share code, notes, and snippets.

Atul Vinayak avinayak

Block or report user

Report or block avinayak

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 Snow.pde
AccelerometerManager accel;
float ax, ay, az;
void setup() {
accel = new AccelerometerManager(this);
orientation(PORTRAIT);
background (0);
fill(255);
flakes = new flake [N];
for(int i=0;i<N;i++)
View list_filter.ex
defmodule Solution do
def main do
String.split(IO.read(:stdio, :all), [" ", "\n"])
|> Enum.with_index
|> Enum.filter(fn({_,i}) -> rem(i,2) ==1 end)
|> Enum.map(fn({x,_})->x end)
|> Enum.join("\n")
|> IO.puts
end
View swiggy.js
//go to swiggy.com
//log in
//press F12 on home page
//paste the script given below in console and press enter
//all_orders object will be populated with all your swiggy order data
all_orders=[]
recfetch = (oid)=>{
fetch('https://www.swiggy.com/dapi/order/all?order_id='+oid)
View gist:f40592b18ad02e60bfcf437c9b08bfce
def binsearch(a,q):
l = mid = 0
r = len(a) -1
while l<=r:
mid = (l+r)//2
if a[mid] == q:
return mid
elif a[mid]< q:
l = mid +1
elif a[mid]> q:
View test.xml
<Response>
<Say voice="alice">Welcome to Thybolt. Welcome to Thybolt. Welcome to Thybolt. Welcome to Thybolt. Welcome to Thybolt. Welcome to Thybolt. </Say>
<Play>http://demo.twilio.com/docs/classic.mp3</Play>
</Response>
@avinayak
avinayak / Installing transmission & plex in RPi for NTFS drives
Last active Jun 1, 2018
Installing transmission & plex in RPi for NTFS drives
View Installing transmission & plex in RPi for NTFS drives
install ntfs-3g from sudo apt-get install
install transmission-daemon
add next line to end of ~/.bashrc
sudo mount -t ntfs-3g -o uid=pi,gid=debian-transmission,umask=007 /dev/sda1 /mnt/d1
stop transmission daemon
sudo nano /etc/transmission-daemon/settings.json # set all folders an stuff
sudo usermod -a -G debian-transmission pi
sudo nano /etc/init.d/transmission-daemon #change USER=pi
View ga.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
View hover charm
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
function ll (argument) {
$(".bar").hover(
function(){
$(".vote").stop().animate({
left:'40px',opacity:1.0
You can’t perform that action at this time.