Skip to content

Instantly share code, notes, and snippets.

View hoony-o-1's full-sized avatar
🐒
small, slow, and solid

hoony hoony-o-1

🐒
small, slow, and solid
View GitHub Profile
@kendru
kendru / visitor.rs
Created July 15, 2019 03:55
Example implementation of the visitor pattern in Rust
pub trait Visitable {
fn accept<V: Visitor>(&self, visitor: &mut V) -> V::Result;
}
pub trait Visitor {
type Result;
fn visit_num(&mut self, num: &Num) -> Self::Result;
fn visit_add<T, U>(&mut self, add: &Add<T, U>) -> Self::Result
@max-mapper
max-mapper / readme.md
Last active May 14, 2022 09:12
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below

@cornchz
cornchz / scraper.py
Last active May 1, 2018 12:13
[PyConKR 2014] 30λΆ„λ§Œμ— λ”°λΌν•˜λŠ” λ™μ‹œμ„± 슀크래퍼
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from gevent import monkey; monkey.patch_all()
import re
from urlparse import urljoin
from gevent.pool import Pool
import requests

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&amp;staging
@jayj
jayj / flexbox.less
Last active April 22, 2025 14:38
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox
@zyxar
zyxar / exercise.tour.go
Last active October 28, 2025 01:42
tour.golang exercise solutions
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)