Skip to content

Instantly share code, notes, and snippets.

View Barbayar's full-sized avatar

Barbayar Dashzeveg Barbayar

View GitHub Profile
@Barbayar
Barbayar / gist:5fa8e9b6deecb31d403d
Last active August 29, 2015 14:07
[Gmail] Select All & Delete
// jQuery injection
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js";
document.getElementsByTagName('body')[0].appendChild(jq);
// http://stackoverflow.com/questions/6157929/how-to-simulate-mouse-click-using-javascript
// jQuery-ын mousedown, mouseup ашиглахаар болохгүй байгаа. Яагаад гэдгийг мэдэхгүй
function simulate(element, eventName)
{
var options = extend(defaultOptions, arguments[2] || {});
@Barbayar
Barbayar / Mongolian.keylayout
Last active August 29, 2015 14:10
Mongolian Keyboard Layout for Mac OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Buyant-Orgil.E, mail:[email protected] 2009-11-19 at 20:23 (JST)-->
<keyboard group="7" id="19456" name="Mongolian" maxout="1">
<layouts>
<layout first="0" last="0" modifiers="30" mapSet="138"/>
</layouts>
<modifierMap id="30" defaultIndex="5">
<keyMapSelect mapIndex="0">
<modifier keys="option control command?"/>
@Barbayar
Barbayar / Data Structures.cpp
Last active December 2, 2015 22:19
Data Structures
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
struct ListNode {
int val;
ListNode *next;
@Barbayar
Barbayar / mazaalai-pp.md
Last active October 29, 2016 07:49
Privacy Policy for Mazaalai Bot

Privacy Policy

We don't collect any information from you, but note that the message you sent to our bot will be stored on Facebook's database. It's your duty to manage the messages between you and our bot.

Contact

Admin: https://m.me/barbayar.dashzeveg

@Barbayar
Barbayar / DynamoDB Table Schema.md
Last active November 6, 2016 16:27
Мазаалай Bot

screen shot 2016-11-02 at 12 25 02

import json
# import simplejson
# import pickle
# from dateutil.relativedelta import relativedelta
import requests
import logging
from fake_useragent import UserAgent
# ATOME_COOKIE = "atome_cookies.pickle"
# ATOME_USER_ID = "atome_user_id.pickle"