title | tags | created | modified | |
---|---|---|---|---|
Raspberry Pi Initial Setup V2 |
|
2019-01-26T17:31:49.097Z |
2019-02-02T17:03:37.037Z |
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
const diffInDaysFromToday = (toDate) => { | |
const today = new Date() | |
return Math.ceil((today - toDate)/(1000 * 3600 * 24)) | |
} | |
dv.list(dv.pages() | |
.filter(p => p.file.name.contains("🌳")) | |
.where(p => diffInDaysFromToday(p.reviewed) > p.retention) | |
.map(p => p.file.link)) |
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
#include <DigiMouse.h> | |
// wait for DELAY_MINUTES, this is less than your | |
// screen saver's timeout | |
#define DELAY_MINUTES 2 | |
void setup(){ | |
DigiMouse.begin(); | |
pinMode(1, OUTPUT); | |
} |
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
from pwn import * | |
import hlextend | |
# high score + 1 from the game | |
HIGH_SCORE = 653086069891774904466108141306028536722619133805 | |
# the proof taken by plauing game with initial multiplier of 6 because it is | |
# the first character in the high score number taken as string | |
SIGNATURE = "1ec356a3f23437e5350a1288a270bf221af33ec1c8b7d5147738e532534fb0b1ee5678e1cbba120b27b1d20c3ac5c2479be7b139b9181ead93fc841a50f8237b" |
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
web: python main.py |
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
int local_1c = 0; | |
int local_14 = 0; | |
printf([ebx-0x1870]); | |
scanf("%d", &local_1c); | |
while (local_10 <= local_1c) { | |
printf([ebx-0x185b]); | |
scanf("%d", &local_18); | |
local_14 += local_18; | |
local_10 += 1; | |
} |
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
#!/bin/bash | |
# This script mutes spotify when it plays an advertisement | |
# Requires playerctl and pactl | |
check_deps() { | |
if ! [ -x "$(command -v playerctl)" ]; then | |
echo 'Error: playerctl is not installed or not in PATH. Check https://github.com/altdesktop/playerctl' >&2 | |
exit 1 |
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
#!/usr/bin/env python | |
class Stack: | |
def __init__(self): | |
self.arr = [] | |
def push(self, ele): | |
self.arr.append(ele) | |
def pop(self): | |
return self.arr.pop() | |
def isEmpty(self): |
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
package main | |
import ( | |
"encoding/binary" | |
"fmt" | |
"net" | |
"os" | |
"time" | |
) |
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
use std::cmp::Ordering; | |
#[derive(Debug)] | |
struct Node { | |
value: i32, | |
left_child: Box<Option<Node>>, | |
right_child: Box<Option<Node>>, | |
} | |
impl Node { |
NewerOlder