Skip to content

Instantly share code, notes, and snippets.

View taeguk's full-sized avatar
❄️
asdf

Taeguk Kwon taeguk

❄️
asdf
View GitHub Profile
@taeguk
taeguk / EC++48.cpp
Last active May 30, 2016 19:37
EC++ no.48 my example.
#include <iostream>
template <unsigned N>
struct IsPrime {
static_assert(N >= 2, "The number must not be less than 2.");
IsPrime() = delete;
static bool value() { return static_cast<bool>(_value); }
private:
@taeguk
taeguk / EC++47.cpp
Created May 30, 2016 14:10
EC++ no.47 my example
#include <iostream>
// 특성정보에 대한 tag들.
struct walk_ability_tag {};
struct jump_ability_tag {};
struct fly_ability_tag {};
struct run_ability_tag :public walk_ability_tag {};
struct ground_ability_tag :public run_ability_tag, public jump_ability_tag {};
struct all_ability_tag :public ground_ability_tag, public fly_ability_tag {};
@lrascao
lrascao / gist:f57312ff33b799c4c0db56b10e80fe26
Created March 31, 2016 16:19
Export/Import datadog dashboards
dash_id=xxxx
api_key=xxx
app_key=xxx
# 1. export
curl -X GET "https://app.datadoghq.com/api/v1/dash/${dash_id}?api_key=${api_key}&application_key=${app_key}" > dash.json
# 2. edit dash.json
move "graphs", "title", "description" up one level in the json hierarchy, from being beneath "dash" to being at the same level
@baldurk
baldurk / sourceindex.md
Last active February 23, 2024 08:48
Source indexing for github projects

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/
#include <thread>
#include <future>
#include <exception>
#include <chrono>
#include <iostream>
class interrupt_flag
{
std::atomic<bool> flag;
std::condition_variable* thread_cond;
@taeguk
taeguk / lock.cpp
Last active March 26, 2024 08:41
Lock/Unlock Session by the "computer using rule" in Windows.
/*
Lock/Unlock Session by the "computer using rule".
Support versions >= Windows 7
https://gist.github.com/taeguk/13b607f42020981f6cf9
*/
#include <windows.h>
#include <stdio.h>
#include <time.h>
#include <Wtsapi32.h>
@haje01
haje01 / TensorFlow 시작하기.md
Last active May 3, 2024 07:30
TensorFlow 시작하기

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.

@gigiigig
gigiigig / auxpattern.scala
Last active November 11, 2023 05:22
Aux Pattern
import shapeless._
import scalaz._
import Scalaz._
object console extends App {
trait Foo[A] {
type B
def value: B
@nickautomatic
nickautomatic / cmder.md
Last active September 20, 2023 13:59
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
@aaronhurt
aaronhurt / curltest.c
Last active November 26, 2023 10:29
example code using libcurl and json-c to post and parse a return from http://jsonplaceholder.typicode.com
/**
* example C code using libcurl and json-c
* to post and return a payload using
* http://jsonplaceholder.typicode.com
*
* License:
*
* This code is licensed under MIT license
* https://opensource.org/licenses/MIT
*