This file contains 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
(defun compileandrun() | |
(interactive) | |
(let* ((src (file-name-nondirectory (buffer-file-name))) | |
(exe (file-name-sans-extension src))) | |
(compile (concat "g++ -std=c++11 -Wshadow -Wall " src " -o " exe " -O2 -Wno-unused-result && ./" exe)))) |
This file contains 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
fn countOnes(x: usize) -> usize { | |
let mut c = 0; | |
let mut x = x; | |
c = (x & 0x55555555) + ((x >> 1) & 0x55555555); | |
c = (c & 0x33333333) + ((c >> 2) & 0x33333333); | |
c = (c & 0x0f0f0f0f) + ((c >> 4) & 0x0f0f0f0f); | |
c = (c & 0x00ff00ff) + ((c >> 8) & 0x00ff00ff); | |
c = (c & 0x0000ffff) + ((c >> 16) & 0x0000ffff); | |
return c; | |
} |
This file contains 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/bash | |
if [ ! -d "targets" ]; then | |
mkdir targets | |
fi | |
if [ ! -d "frames" ]; then | |
mkdir frames | |
fi | |
word2target() { |
This file contains 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
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
(setq pkgs | |
'(company | |
ido-vertical-mode | |
impatient-mode | |
use-package |
This file contains 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 | |
# Surfraw -- Shell Users' Revolutionary Front Against the World wide web | |
# | |
# Copyright (c) 2003-2018 The Surfraw-Devel Team | |
# <[email protected]> | |
# Copyright (c) 2000-2001 Julian Assange, placed into the public domain | |
# Copyright (c) 2000 Melbourne Institute for Advanced Study, placed into the public domain | |
# | |
# see the file COPYING for further copyright details | |
# |