Skip to content

Instantly share code, notes, and snippets.

View hbina's full-sized avatar
🐕
hopefully doing something useful...

Hanif Ariffin hbina

🐕
hopefully doing something useful...
View GitHub Profile
@hbina
hbina / figure.tex
Created June 4, 2020 19:04
How to include a figure in LaTeX
\begin{figure}[H]
\center{\includegraphics[width=\textwidth]
{figures/biotensor.png}}
\caption{\label{fig:my-label} My figure. An example of a cool figure}
\end{figure}
@hbina
hbina / error.log
Last active January 17, 2020 20:01
note: this is a BETA release; ask questions and report bugs at https://tectonic.newton.cx/
Running TeX ...
error: something bad happened inside TeX; its output follows:
===============================================================================
(submission.tex
LaTeX2e <2018-04-01> patch level 4
Babel <3.20> and hyphenation patterns for 84 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
def countAndSay(self, n: int) -> str:
if (n == 1):
return "1"
else:
string: str = self.countAndSay(n-1)
grouped: List[List[str]] = [list(g) for k, g in groupby(string)]
result = ""
for x in grouped:
result += str(len(x)) + x[0]
return result
template <
typename OutputIteratorOuter,
typename OutputIteratorInner,
typename InputIterator,
typename UnaryPredicate>
OutputIteratorOuter split_if(
InputIterator iter_begin,
InputIterator iter_end,
const UnaryPredicate &predicate)
{
<!DOCTYPE html>
<html lang="en">
<head>
<title>Rustomword</title>
<style>
css_hide_element {
display: none;
}
diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs
index 512eed7e..9ae7ba1d 100644
--- a/src/cargo/ops/cargo_new.rs
+++ b/src/cargo/ops/cargo_new.rs
@@ -698,9 +698,23 @@ fn get_environment_variable(variables: &[&str]) -> Option<String> {
fn discover_author() -> CargoResult<(String, Option<String>)> {
let cwd = env::current_dir()?;
let git_config = if let Ok(repo) = GitRepository::discover(&cwd) {
- repo.config()
- .ok()
Finished dev [unoptimized + debuginfo] target(s) in 0.18s
Running target/debug/deps/cargo-a00f86d0752b0ae9
running 26 tests
test core::package_id::tests::display ... ok
test core::package_id::tests::debug ... ok
test core::package_id_spec::tests::matching ... ok
test core::package_id_spec::tests::bad_parsing ... ok
test sources::git::source::test::test_canonicalize_idents_by_stripping_dot_git ... ok
test core::package_id::tests::invalid_version_handled_nicely ... ok
hbina085@hbina085:~/git/cargo$ cargo build
Compiling cargo v0.41.0 (/home/hbina085/git/cargo)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/hbina085/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.10ophusoaonl8pnj.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.131fnjdvdvcrp0jh.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.16xw3er25l9mx2gy.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.170xczpdpo27jiuc.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.171z45e71rw2ibl1.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.171zvqvmzm9ithvr.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154edca75d178.17kev2j5y6enskm3.rcgu.o" "/home/hbina085/git/cargo/target/debug/deps/cargo-d69154ed
Compiling cargo-registry v0.2.2 (/home/hbina085/git/crates.io)
error: linking with `cc` failed: exit code: 1
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/hbina085/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/hbina085/git/crates.io/target/debug/deps/transfer_crates-7b79aa4ce6dd7735.10kspxeibcal03a.rcgu.o" "/home/hbina085/git/crates.io/target/debug/deps/transfer_crates-7b79aa4ce6dd7735.10qyigiqb46me7ex.rcgu.o" "/home/hbina085/git/crates.io/target/debug/deps/transfer_crates-7b79aa4ce6dd7735.10sz2tc7lwxle1ke.rcgu.o" "/home/hbina085/git/crates.io/target/debug/deps/transfer_crates-7b79aa4ce6dd7735.10u1onm5cqn3ffxf.rcgu.o" "/home/hbina085/git/crates.io/target/debug/deps/transfer_crates-7b79aa4ce6dd7735.11lmu26imzhec165.rcgu.o" "/home/hbina085/git/crates.io/target/debug/deps/transfer_crates-7b79aa4ce6dd7735.182gmdjxga02gdyy.rcgu.o" "/home/hbina085/git/crates.io/target/debug/deps/tran
@hbina
hbina / run.sh
Last active September 29, 2019 13:20
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-Wno-dev \
-DCMAKE_PREFIX_PATH=/usr/include/x86_64-linux-gnu/qt5 \
-DWITH_DISNEY_MATERIAL=ON \
-DWITH_EMBREE=ON \
-DUSE_SSE42=ON \
-DUSE_STATIC_BOOST=OFF \
-DBOOST_INCLUDEDIR=$APPLESEED_DEPENDENCIES/include/boost_1_61_0 \
-DBOOST_LIBRARYDIR=$APPLESEED_DEPENDENCIES/lib/ \