Skip to content

Instantly share code, notes, and snippets.

View yeonsh's full-sized avatar

Seunghoon Yeon yeonsh

View GitHub Profile
@alex-hhh
alex-hhh / pwgen-gui.rkt
Created March 27, 2019 03:46
Password Generator Gui
#lang racket/gui
;; Copyright (c) 2019 Alex Harsányi
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active July 5, 2021 18:58
SSH into Linux Subsystem for Windows
  • In /etc/ssh/sshd_conf, set UsePrivilegeSeparation to no
  • In /etc/ssh/sshd_conf, temporarily enable plaintext passwords
  • In /etc/ssh/sshd_conf, change port (e.g. to 23) to avoid confusion with Windows SSH server
  • sudo service ssh restart
  • Add alternative port as a new rule to Windows firewall
  • On the client: ssh-copy-id user@server
  • In /etc/ssh/sshd_conf, re-disable plaintext passwords

To fix Could not load host key ... error:

  • sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
@akolosov
akolosov / gist:cedaac86b333a4ced95f
Last active December 23, 2019 03:46
vim 7.4 with lua+GUI on Ubuntu 14.04
#!/bin/sh
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo mkdir /usr/include/lua5.1/include
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include
cd ~
hg clone https://code.google.com/p/vim/
@hvoecking
hvoecking / translate.go
Last active March 28, 2024 13:52
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//
@mjhea0
mjhea0 / quick_flask.sh
Created August 24, 2013 20:28
mix your own
mkdir flaskapp && cd flaskapp
touch config.py run.py shell.py app.db requirements.txt
mkdir app
touch app/__init__.py app/constants.py
mkdir app/static app/templates
@kbinani
kbinani / GetModuleFileName.cpp
Last active September 12, 2019 01:22
GetModuleFileName (WinAPI) equivalent implementation for OSX
#include <mach-o/dyld.h>
#include <mach-o/getsect.h>
#include <dlfcn.h>
#include <string>
std::string GetModuleFileName(const void *module)
{
if (!module) { return std::string(); }
uint32_t count = _dyld_image_count();
for (uint32_t i = 0; i < count; ++i) {
@schlamar
schlamar / !Python serialization
Created July 18, 2012 05:32
Python serializer benchmark: json, simplejson, cPickle, messagepack, simpleubjson, marshal, literal_eval
System
======
Windows 7
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
Small data
==========