This file contains hidden or 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 | |
# ssh-multi.sh - a script to ssh multiple servers over multiple tmux panes | |
# usage: type tmux then from inside tmux type ssh-multi.sh HOST1 HOST2 ... HOSTN | |
# Muayyad Alsadi, D.Kovalov | |
# https://gist.github.com/muayyad-alsadi/bd25845776bb6b4185ba/ | |
# https://gist.github.com/dmytro/3984680 | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
function error() { |
This file contains hidden or 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
Name: fake-runtime | |
Version: 0.0.1 | |
Release: 1%{?dist} | |
Summary: Fake runtime | |
License: GPLv2+ | |
BuildArch: noarch | |
Provides: kmod | |
Provides: systemd = 204 | |
Provides: systemd-sysv = 204 | |
Provides: systemd-units = 204 |
This file contains hidden or 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
<html> | |
<head> | |
<title>{{.Title}}</title> | |
</head> | |
<body> | |
<h1>{{.Title}}</h1> | |
</body> | |
</html> |
This file contains hidden or 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
# as root | |
yum install python-pip python-pillow python-lxml python-psutil python-simplejson python-ldap python-crypto python-pwquality PyYAML MySQL-python python-psycopg2 libxslt-python python-greenlet python-gevent python-gevent-socketio python-gevent-websocket | |
pip install --upgrade pip | |
pip install wheel virtualenv | |
################## | |
# as usual user | |
################### | |
# install to common ~/wheels to save downloads |
This file contains hidden or 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
.pull-start {float:right;} | |
.pull-end {float:left;} | |
.text-start {text-align:right;} | |
.text-end {text-align:left;} | |
.media > .pull-start {margin-left: 10px;} | |
.media > .pull-end {margin-right: 10px;} | |
.carousel-control.prev { right: 15px; left: auto; } | |
.carousel-control.next { left: 15px; right: auto; } |
This file contains hidden or 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
magin-left: 500px; | |
becomes: | |
margin-left: auto; | |
margin-right: 500px | |
while |
This file contains hidden or 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
#include <stdlib.h> | |
#include <alloca.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
int* get_primes(int n, int *l) { | |
char* compo=(char*)alloca(n); | |
int* primes=(int*)malloc(sizeof(int)*n); | |
int i,j,c=0; | |
for(i=0;i<n;++i) compo[i]=0; |
This file contains hidden or 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
import time | |
def get_primes(n): | |
primes=[] | |
compo=set() | |
in_compo=compo.__contains__ | |
add_prime=primes.append | |
add_compo=compo.update | |
for i in range(2, n): | |
if in_compo(i): continue |
This file contains hidden or 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
function get_primes (n) | |
compo={} | |
primes={n=nil, v=nil} | |
last=primes | |
for i=2,n do | |
if not compo[i] then | |
last.v=i | |
last.n={n=nil, n=nil} | |
last=last.n | |
for j=i*2,n,i do |
This file contains hidden or 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
function get_primes (n) | |
compo={} | |
primes={} | |
for i=2,n do | |
if not compo[i] then | |
primes[i]=true | |
for j=i*2,n,i do | |
compo[j]=true | |
end | |
end |