Skip to content

Instantly share code, notes, and snippets.

@ygun
ygun / cleanup.js
Last active May 18, 2018 15:17
Script which removes duplicate text from user reports
// ==UserScript==
// @name Clean comments on antitreningi.ru
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author You
// @match http://antitreningi.ru/ru/student/lessons/lesson/*
// @grant none
// ==/UserScript==
@ygun
ygun / Email Server (Linux, Unix, Mac).md
Created April 2, 2018 13:49 — forked from raelgc/Email Server (Linux, Unix, Mac).md
Setup a Local Only Email Server (Linux, Unix, Mac)

Setup a Local Only Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@ygun
ygun / llsd.js
Last active March 25, 2017 15:27
LinguaLeo sound download
// ==UserScript==
// @name LinguaLeo sound download
// @namespace http://golubev.guru/
// @version 0.2
// @description auto download mp3 from lingualeo dictionary by F7
// @author Yuriy Golubev
// @match https://lingualeo.com/*
// @grant GM_download
// @downloadURL https://gist.github.com/ygun/1b2592876c0e51a511facfde8fbc5413/raw/a26311c5d20383cda45e7f2392b4a5da3945dff4/llsd.js
// ==/UserScript==
@ygun
ygun / multiple_ssh_setting-additional
Last active November 3, 2016 09:54 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts
I had to change the [remote "origin"] / url field in my local .git/config to use the Host defined in .ssh/config in order for this to work, i.e.,
[remote "origin"]
url = [email protected]:activehacker/gfs.git
Without that modification, git would just try to use my default ssh key.
@ygun
ygun / hint
Last active June 7, 2016 20:35
ASUS N56J brightnes fix
First:
sudo sed 's/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="/' -i /etc/default/grub
Then:
sudo update-grub
@ygun
ygun / web-servers.md
Created March 31, 2016 16:16 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ygun
ygun / customBindingFile.xjb
Created March 3, 2016 16:41 — forked from pulkitsinghal/customBindingFile.xjb
How to get Java POJOs, generated from schema files, to implement custom interfaces via maven plugins
<?xml version="1.0"?>
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
jxb:extensionBindingPrefixes="xjc">
<jxb:bindings schemaLocation="../schema/yourSchemaFile.xsd">
<jxb:bindings node="//xs:complexType[@name='SomeElementNameFromYourSchemaFile']">
@ygun
ygun / 0_reuse_code.js
Created February 2, 2016 22:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console