Skip to content

Instantly share code, notes, and snippets.

View SteveLTN's full-sized avatar

W Shao SteveLTN

  • Stockholm, Sweden
View GitHub Profile
@SteveLTN
SteveLTN / gist-error
Created April 5, 2013 10:28
Error message presented in Visual Studio Express 2012 when running Gecode/gist program.
00000000() Unknown
[Frames below may be incorrect and/or missing]
> msvcp110.dll!std::locale::operator=(const std::locale & _Right) Line 436 C++
msvcp110.dll!std::ios_base::copyfmt(const std::ios_base & _Other) Line 483 C++
msvcp110.dll!std::basic_ios<char,std::char_traits<char> >::copyfmt(const std::basic_ios<char,std::char_traits<char> > & _Right) Line 79 C++
Project1.exe!Gecode::operator<<<char,std::char_traits<char>,Gecode::IntVar>(std::basic_ostream<char,std::char_traits<char> > & os, const Gecode::VarArray<Gecode::IntVar> & x) Line 2170 C++
Project1.exe!Gecode::Gist::Print<SendMoreMoney>::inspect(const Gecode::Space & node) Line 148 C++
GecodeGist-4-0-0-r-x86.dll!Gecode::Gist::TreeCanvas::inspectCurrentNode(bool,int) C++
GecodeGist-4-0-0-r-x86.dll!Gecode::Gist::TreeCanvas::mouseDoubleClickEvent(class QMouseEvent *) C++
QtGui4.dll!62f839ec() Unknown
@SteveLTN
SteveLTN / Gist-codes
Created April 5, 2013 10:55
The lines of code presented in VS when running Gecode/gist
locale& operator=(const locale& _Right) _THROW0()
{ // assign a locale
if (_Ptr != _Right._Ptr)
{ // different implementation, point at new one
_DELETE_CRT(_Ptr->_Decref());
_Ptr = _Right._Ptr;
_Ptr->_Incref();
}
> return (*this);
}
@SteveLTN
SteveLTN / devise.zh-CN.yml
Last active December 19, 2015 13:39
zh-CN translation for Devise 3.0.0.rc
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
zh-CN:
devise:
confirmations:
confirmed: "我们已经验证您的账号,您已成功登录。"
send_instructions: "您会在几分钟内收到一封告诉您如何验证账号的邮件。"
send_paranoid_instructions: "如果您的Email地址在我们的数据库中,您会在几分钟内收到一封告诉您如何验证账号的邮件。"
failure:
already_authenticated: "您已经登录了。"
@SteveLTN
SteveLTN / Manico crash report
Created October 29, 2013 08:23
OS X Mavericks, Manico 1.2.1
Process: Manico [1350]
Path: /Applications/Manico.app/Contents/MacOS/Manico
Identifier: im.manico.Manico
Version: 1.2.1 (221)
Code Type: X86-64 (Native)
Parent Process: launchd [155]
Responsible: Manico [1350]
User ID: 501
Date/Time: 2013-10-29 09:21:29.970 +0100
@SteveLTN
SteveLTN / System log for Manico
Created October 29, 2013 08:25
OS X Mavericks Manico 1.2.1
10/29/13 9:20:14.043 AM Manico[1350]: open on /var/folders/qb/p07kr7bn3csc94mlyngwdhdc0000gn/T/ga.js: File exists
10/29/13 9:21:30.316 AM com.apple.launchd.peruser.501[155]: (im.manico.Manico.56000[1350]) Job appears to have crashed: Segmentation fault: 11
10/29/13 9:21:30.437 AM ReportCrash[1496]: Saved crash report for Manico[1350] version 1.2.1 (221) to /Users/ltn/Library/Logs/DiagnosticReports/Manico_2013-10-29-092130_SteveLTNs-MacBook-Pro.crash
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@SteveLTN
SteveLTN / before commenting
Created January 27, 2014 21:10
Result before commenting out Line 5-55, Line 63-68
❯ ./md demo 8
Molecular Dynamics Simulation example program
---------------------------------------------
number of particles is ............ 13500
side length of the box is ......... 25.323179
cut off is ........................ 3.750000
reduced temperature is ............ 0.722000
basic timestep is ................. 0.064000
temperature scale interval ........ 10
stop scaling at move .............. 20
@SteveLTN
SteveLTN / gdb-uncommented
Last active January 4, 2016 17:59
GDB result of uncommented code
❯ gdb ./md task3 82ac80d ✗
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@SteveLTN
SteveLTN / gdb-commented
Last active January 4, 2016 17:59
commented code result of GDB
❯ gdb ./md demo 8a24e22
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
@SteveLTN
SteveLTN / site-mallory-attempt1.html
Last active May 7, 2017 21:04
Is CSRF Token Bogus? - blog post gist
<script>
const url = 'http://site.alice.com/posts'
fetch(url, { method: 'POST', credentials: 'include' })
</script>