This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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=""> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Add the snippet below in sketch.js | |
### optional: convert to mp4 using ffmpeg -fflags +genpts -i input.webm -r 24 out.mp4 | |
function record(){chunks.length=0;let e=document.querySelector("#defaultCanvas0").captureStream(300),t=new MediaRecorder(e);t.ondataavailable=(e=>{e.data.size&&chunks.push(e.data)}),t.onstop=exportVideo,setTimeout(()=>{t.stop()},1e4),t.start()}function exportVideo(e){var t=new Blob(chunks),o=document.createElement("video");o.id="recorded",o.controls=!0,o.src=URL.createObjectURL(t),document.body.appendChild(o),o.play()}chunks=[],record(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import urllib.parse | |
import json | |
import random | |
import tweepy | |
que = ['why', 'how', 'why', 'how', 'why', 'how', 'why', 'how', | |
'what', 'who', 'can', 'is', 'will', 'could', 'would'] | |
def auto_query(que, word): |
OlderNewer