Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** Python style properties in C++ | |
** (C) 2010 Arkanosis | |
** [email protected] | |
** | |
** Example code released under the MIT license | |
** http://www.opensource.org/licenses/mit-license.php | |
** | |
** This is an original portable version of | |
** http://www.codeproject.com/KB/cpp/properties.aspx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Use this script as your EDITOR to allow editing remote files with emacsclient. | |
# Works by connecting to the Emacs machine with SSH and using a suitable tramp prefix. | |
# How to reach this machine from the one that's running Emacs | |
ME=user@remote-host | |
# How to reach the machine that's running Emacs from this machine | |
THEY=user@host-running-emacs |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T> | |
T ConvertString( const std::string &data ) | |
{ | |
if( !data.empty( )) | |
{ | |
T ret; | |
std::istringstream iss( data ); | |
if( data.find( "0x" ) != std::string::npos ) | |
{ | |
iss >> std::hex >> ret; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Minor mode for compiling java classes | |
(defvar javac-mode nil | |
"Mode variable for java class files.") | |
(make-variable-buffer-local 'javac-mode) | |
(defun javac-mode (&optional arg) | |
"Minor mode for compiling java class files. | |
Special Commands: | |
\\{javac-mode-map}" | |
(interactive "P") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <regex> | |
#include <string> | |
#include <vector> | |
std::vector<std::string> Split(const std::string& str, const std::string& regex) | |
{ | |
return {std::sregex_token_iterator(str.begin(), str.end(), std::regex(regex), -1), std::sregex_token_iterator()}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# https://gist.github.com/4368898 | |
# Public domain code by anatoly techtonik <[email protected]> | |
# AKA Linux `which` and Windows `where` | |
# For Python 3 you probably want | |
# https://docs.python.org/dev/library/shutil.html#shutil.which | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# An example of decoding/encoding datetime values in JSON data in Python. | |
# Code adapted from: http://broadcast.oreilly.com/2009/05/pymotw-json.html | |
# Copyright (c) 2023, Abhinav Upadhyay | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: |
OlderNewer