Skip to content

Instantly share code, notes, and snippets.

View fetiu's full-sized avatar

Jake Jooncheol Kim fetiu

View GitHub Profile
Sjoerds-iMac:~ sjoerd$ brew install -vd ncursesw
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4 -w -pipe
MAKEFLAGS: -j8
PKG_CONFIG_PATH: /usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:
==> Downloading http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz
@ketankhairnar
ketankhairnar / DecoratorTraits.scala
Created February 27, 2011 06:48
Decorator pattern using scala traits
package com.example.chapter7.traits
class DecoratorTraits
abstract class Check {
def check():String ="Checked application details"
}
trait employmentCheck extends Check {
override def check():String="Checked employment details " +super.check()
@dideler
dideler / python-colours.md
Last active May 23, 2024 12:37
Formatted output in the terminal (using Python)

Most (or all) of these methods make use of ANSI escape sequences.

Straight-up

For example, using a dictionary:

ansi = {'underline': '\033[4m', 'bold': '\033[1m', 'end':'\033[0m'}
print '{[bold]}Hello World{[end]}'.format(ansi, ansi)
@mculp
mculp / voices.txt
Created December 3, 2014 00:14
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active June 24, 2024 15:54
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@mtolly
mtolly / mac-libgdiplus.sh
Last active March 10, 2024 07:35
How to build and install the Mono libgdiplus.dll on a Mac with Homebrew (update: no longer needed, see comments)
#!/bin/bash
# First install XQuartz, then...
brew install freetype fontconfig libpng
ln -s /opt/X11/include/X11 /usr/local/include/X11
git clone git@github.com:mono/libgdiplus
cd libgdiplus
./autogen.sh
make install
@austinglaser
austinglaser / gcov_project.yml
Created July 17, 2016 21:41
Basic configuration for Ceedling using the gcov plugin
---
# Notes:
# Sample project C code is not presently written to produce a release artifact.
# As such, release build options are disabled.
# This sample, therefore, only demonstrates running a collection of unit tests.
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
@wojteklu
wojteklu / clean_code.md
Last active June 26, 2024 20:51
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@cschiewek
cschiewek / x11_docker_mac.md
Last active June 21, 2024 09:14
X11 in docker on macOS

To forward X11 from inside a docker container to a host running macOS

  1. Install XQuartz: https://www.xquartz.org/
  2. Launch XQuartz. Under the XQuartz menu, select Preferences
  3. Go to the security tab and ensure "Allow connections from network clients" is checked.
  4. Run xhost + ${hostname} to allow connections to the macOS host *
  5. Setup a HOSTNAME env var export HOSTNAME=`hostname`*
  6. Add the following to your docker-compose:
 environment:
@arslancharyev31
arslancharyev31 / C_v1.bnf
Created October 14, 2017 15:32
C .bnf grammar. Version 1.
{
tokens=[
space='regexp:\s+'
identifier='regexp:[a-zA-Z][a-zA-Z0-9_]*'
integer-constant='regexp:\d+'
character-constant='regexp:[a-zA-Z]'
floating-constant='regexp:[+-]?([0-9]*[.])?[0-9]+f'
enumeration-constant='regexp:[a-zA-Z][a-zA-Z0-9_]*' // Same as identifier
]