Skip to content

Instantly share code, notes, and snippets.

@viennadd
viennadd / gnome_retina_scale.sh
Last active April 27, 2017 16:26
gnome display scale factor setting (on retina display)
gsettings set org.gnome.desktop.interface scaling-factor 2
@viennadd
viennadd / router_renew.py
Created August 14, 2016 08:29
Renew My TP-Link IP
import os
import re
import time
import requests
GlobalVars = {
'HTTP_ADDRESS': 'http://192.168.----',
'AUTHORIZATION': 'Basic ============'
}
#include <deque>
#include <iostream>
#include <thread>
#include <chrono>
#include <random>
using namespace std;
class Snake;
class SnakeGame;
/* DP Execrise */
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
const int MAX_M = 1000;
const int MAX_N = 1000;
/* DP Execrise */
#include <iostream>
using namespace std;
const int MAX_LEN = 1000;
int seq[MAX_LEN];
int lis[MAX_LEN];
int main()
//
// Created by vienna on 4/4/2016.
//
/* heap data structure implementation */
/* start with index 0, then it need +1 and +2
* to locate left and right child */
inline int left(int i)
{