git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch # show stats.
git apply --check file.patch # check for error before applying
| sudo launchctl stop com.openssh.sshd | |
| sudo launchctl start com.openssh.sshd |
| from __future__ import division | |
| def add(num1, num2): | |
| assert type(num1) == int or type(num1) == float | |
| assert type(num2) == int or type(num2) == float | |
| return num1 + num2 | |
| def divide(numerator, denominator): | |
| return numerator / denominator |
| /* compile with: | |
| on linux: gcc -g stack_traces.c | |
| on OS X: gcc -g -fno-pie stack_traces.c | |
| on windows: gcc -g stack_traces.c -limagehlp | |
| */ | |
| #include <signal.h> | |
| #include <stdio.h> | |
| #include <assert.h> |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
| // Convert a wide Unicode string to an UTF8 string | |
| std::string utf8_encode(const std::wstring &wstr) | |
| { | |
| int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL); | |
| std::string strTo(size_needed, 0); | |
| WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &strTo[0], size_needed, NULL, NULL); | |
| return strTo; | |
| } | |
| // Convert an UTF8 string to a wide Unicode String |
| //------------------------------------------------------------------------------ | |
| // pdbdump.c - dump symbols from .pdb and executable files (public domain). | |
| // - to compile; cl.exe /Ox /Zi pdbdump.c | |
| // - | |
| // - Martin Ridgers, pdbdump 'at' fireproofgravy.co.uk | |
| //------------------------------------------------------------------------------ | |
| #include <stdio.h> | |
| #include <Windows.h> | |
| #include <DbgHelp.h> |
| gtest |