Skip to content

Instantly share code, notes, and snippets.

@alehano
alehano / gist:aa0aa924937fac1cec883af8d1c22a51
Last active August 19, 2025 10:47
AI detection methods
Category How Detectors Work    Evasion Techniques  
Patterns & statistical models NLP, perplexity,  burstiness, embeddings, classification Rewrite, changed style,  add personality   
Watermarking Hidden token biases  when making something    Change words, use changes      
Database comparison    Find text that was made before by retrieval Make new  words   
Adversarial training Reinforcement learning to  make things better against detectors Use systems like AuthorMist
Stylometric hiding    Hide style by translation or copying    Adversarial stylometry, changing-word mode
@alehano
alehano / gist:fe96934a7f7d421f3e76
Created January 12, 2016 07:40
Stop / remove all Docker containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@alehano
alehano / gist:3729edd107c752935237
Last active August 29, 2015 14:18
Sublime text move cursor with CTRL+JLIKUO
[
{ "keys": ["ctrl+l"], "command": "move_to", "args": {"to": "hardeol", "extend": false} },
{ "keys": ["ctrl+j"], "command": "move_to", "args": {"to": "hardbol", "extend": false} },
{ "keys": ["ctrl+i"], "command": "line_jumper", "args": { "number_of_lines": 10, "cmd": "up" } },
{ "keys": ["ctrl+shift+i"], "command": "line_jumper", "args": { "number_of_lines": 10, "cmd": "up_select" } },
{ "keys": ["ctrl+k"], "command": "line_jumper", "args": { "number_of_lines": 10, "cmd": "down" } },
{ "keys": ["ctrl+shift+k"], "command": "line_jumper", "args": { "number_of_lines": 10, "cmd": "down_select" } },
@alehano
alehano / Bootstrap align responsive
Last active August 29, 2015 14:17
Bootstrap align responsive
/*
* Responsive text aligning
* http://ohryan.ca/2014/08/14/set-responsive-text-alignment-bootstrap-3/
*/
.text-xs-left { text-align: left; }
.text-xs-right { text-align: right; }
.text-xs-center { text-align: center; }
.text-xs-justify { text-align: justify; }
@media (min-width: @screen-sm-min) {
@alehano
alehano / gist:db216ee27b421e4a11b4
Created July 31, 2014 06:45
Http Handler auth decorator
package main
import (
"fmt"
"net/http"
)
const (
//user_is_authenticated = false
user_is_authenticated = true
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../core-menu/core-submenu.html">
@alehano
alehano / gist:11302364
Last active August 29, 2015 14:00
Responsive CSS
/*
Depend of screen size it adds to all element with class "scr", additional class (e.g. "scr-sm").
In a css file you can define representation of elements for different devices.
CSS e.g.
element.scr-xs {
... style for mobile phones
}
*/
function viewport() {
@alehano
alehano / gist:11167317
Last active February 22, 2018 08:34
Golang observer pattern
package main
import (
"container/list"
"fmt"
)
type Observer interface {
Update()
}
@alehano
alehano / gist:11144804
Last active August 29, 2015 14:00
Random string in Go
import (
"crypto/rand"
)
func randString(n int) string {
const alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
var bytes = make([]byte, n)
rand.Read(bytes)
for i, b := range bytes {
package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/binding"
"github.com/codegangsta/martini-contrib/render"
"labix.org/v2/mgo"
)
type Wish struct {