Skip to content

Instantly share code, notes, and snippets.

Саморазвитие.
1. Физиологический уровень
1. Сон, трекаем через фитбиты/другие умные девайсы. Крутая книга [https://www.goodreads.com/book/show/34466963-why-we-sleep](https://www.goodreads.com/book/show/34466963-why-we-sleep)
2. Еда. Не злоупотребляем быстрыми углеводами. Польза голоданий (внимание, проконсультируйтесь с врачом/диетологом) [https://observer.com/2017/08/intermittent-fasting-weight-loss-cognitive-function-health/](https://observer.com/2017/08/intermittent-fasting-weight-loss-cognitive-function-health/)
3. Спорт. Разные виды активности
1. Мотивационные (бодибилдинг)
2. Командные (эмоции)
3. Медитативные, бег, серфинг, хайкинг, даже прогулки вокруг офиса без телефона в руках.
4. Вещества. Вредные (алкоголь, кофеин) и полезные. Предпочитать те что дают устойчивый рост и не дают сильных отходняков. (опять же, врачи и диетологи вам в помощь) [https://www.goodreads.com/book/show/48475969-beyond-coffee](https://www.goodreads.com/book/show/48475969-beyond-coffee)
@m0sth8
m0sth8 / jsonhelper.go
Created March 12, 2014 01:20
jsonhelper
// Example
package main;
import (
"jsonhelper"
"fmt"
)
func main(){
jsonValue := []interface {}{
# -*- coding: utf-8 -*-
class IMath:
"""Interface for proxy and real object"""
def add(self, x, y):
raise NotImplementedError()
def sub(self, x, y):
raise NotImplementedError()
public static Double getNumericValueFromLiteralExpr(GoExpr expr) {
if (expr instanceof GoLiteralExpression){
GoLiteral literal = ((GoLiteralExpression) expr).getLiteral();
if (literal instanceof GoLiteralIdentifier){
if (((GoLiteralIdentifier) literal).isIota()){
Integer iotaValue = ((GoLiteralIdentifier) literal).getIotaValue();
if (iotaValue != null)
return iotaValue.doubleValue();
} else {
...
type MyArray [3]string
type MyArray2 MyArray
func HandleMyArray(a MyArray) {
}
...
@m0sth8
m0sth8 / gist:7413650
Created November 11, 2013 14:04
Stacktrace
Traceback:
File "/Users/m0sth8/develop/venv/tulula/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/m0sth8/develop/venv/tulula/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
430. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/m0sth8/develop/venv/tulula/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "/Users/m0sth8/develop/venv/tulula/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "/Users/m0sth8/develop/venv/tulula/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
@m0sth8
m0sth8 / adv3.go
Last active December 18, 2015 06:48 — forked from ZhandosKz/adv3.go
package main
import (
"fmt"
"sync"
"time"
)
func main() {
// POST /api/tasks/ - create Scanning task and return task data
{
"type": "docker" //
"options": { // common options for task
"timeout": 0 // task timeout, 0 - with no timeout
"proxy": "", // proxy settings
},
"docker": { // configuration for docker task type
"image": "barbudo/wappalyzer",
"args": ["http://domain.com"], // arguments pushed to running container
@m0sth8
m0sth8 / first
Last active August 29, 2015 14:06
cpp_party
package main
import (
"encoding/json"
"fmt"
"net/http"
)
type Response struct {
Args map[string]string `json:"args"`