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
# Got from https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 and changed new workable epel rpm url | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm | |
yum -y install ppp pptpd | |
cp /etc/pptpd.conf /etc/pptpd.conf.bak | |
cat >/etc/pptpd.conf<<EOF | |
option /etc/ppp/options.pptpd | |
logwtmp | |
localip 10.0.10.1 | |
remoteip 10.0.10.2-254 |
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
#!/usr/bin/env bash | |
PICTURE_DIR="$HOME/Pictures/bing-wallpapers/" | |
mkdir -p $PICTURE_DIR | |
urls=( $(curl -s http://www.bing.com | \ | |
grep -Eo "url:'.*?'" | \ | |
sed -e "s/url:'\([^']*\)'.*/http:\/\/bing.com\1/" | \ | |
sed -e "s/\\\//g") ) |
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
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist && sudo launchctl load /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist |
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
### General | |
########################################################################### | |
# Scrollback/History limit | |
set -g history-limit 2048 | |
# Index Start | |
set -g base-index 1 | |
# Mouse |
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
from urllib import parse | |
import re | |
import argparse | |
def return_md_image(latex_string): | |
return '}) + '&mode=inline)' | |
def convert_md(input_file, outputfile): | |
with open(input_file, 'r') as ifile: | |
content = ''.join(ifile.readlines()) |
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
@inproceedings{Rizoiu2018a, | |
abstract = {Serious concerns have been raised about the role of `socialbots' in manipulating public opinion and influencing the outcome of elections by retweeting partisan content to increase its reach. Here we analyze the role and influence of socialbots on Twitter by determining how they contribute to retweet diffusions. We collect a large dataset of tweets during the 1st U.S. presidential debate in 2016 and we analyze its 1.5 million users from three perspectives: user influence, political behavior (partisanship and engagement) and botness. First, we define a measure of user influence based on the user's active contributions to information diffusions, i.e. their tweets and retweets. Given that Twitter does not expose the retweet structure -- it associates all retweets with the original tweet -- we model the latent diffusion structure using only tweet time and user features, and we implement a scalable novel approach to estimate influence over all possible unfoldings. Next, w |
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 | |
# Author: Maxwel Leite | |
# Website: http://needforbits.wordpress.com/ | |
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros | |
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007. | |
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas. | |
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today. | |
# Dependencies: wget, fontforge and cabextract | |
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download | |
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic |
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 | |
tmux new-session \; \ | |
split-window -h \; \ | |
send-keys 'htop' C-m \; \ | |
rename-window desktop \; \ | |
new-window \; \ | |
send-keys 'ssh cray' C-m \; \ | |
split-window -h \; \ | |
send-keys 'ssh cray' C-m \; \ |
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
git clone --depth=1 https://github.com/vim/vim.git | |
cd vim | |
./configure --with-features=huge \ | |
--enable-multibyte \ | |
--enable-rubyinterp=yes \ | |
--enable-pythoninterp=yes \ | |
--with-python-config-dir=/usr/lib/python2.7/config \ | |
--enable-python3interp=yes \ | |
--with-python3-config-dir=/usr/lib/python3.5/config \ | |
--enable-perlinterp=yes \ |
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
library(bit64) | |
twepoch <- as.integer64('1288834974657') | |
base <- as.integer64(2) | |
datacenter_id_bits <- 5 | |
worker_id_bits <- 5 | |
sequence_id_bits <- 12 | |
max_datacenter_id <- 1 * base^datacenter_id_bits | |
max_worker_id <- 1 * base^worker_id_bits | |
max_sequence_id <- 1 * base^sequence_id_bits |
OlderNewer