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
package main | |
import ( | |
"fmt" | |
"time" | |
"sync" | |
) | |
type APIEvents struct { | |
Status string |
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
// Reference: https://gist.github.com/leolara/d62b87797b0ef5e418cd | |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
type APIEvents struct { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
--- | |
- name: Spin up a container | |
hosts: localhost | |
connection: local | |
gather_facts: False | |
sudo: False | |
vars: | |
base_image: gigablah/alpine-python | |
container_name: ansible_test | |
tasks: |
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
#include <spu_intrinsics.h> | |
#include <spu_mfcio.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include "le_spe.h" | |
// Local store structures and buffers. | |
volatile parm_context ctx __attribute__ ((aligned(16))); | |
volatile float a[BLOCKSIZE] __attribute__ ((aligned(16))); // active row | |
volatile float x[BLOCKSIZE] __attribute__ ((aligned(16))); // target row |
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
global.P = require 'bluebird' | |
backoff = 100 | |
max_attempts = 10 | |
_random_time = -> Math.random() * 3000 + 1000; | |
_backoff = (attempt) -> if attempt > 0 then backoff * Math.pow(2, attempt-1) else 0 | |
_with_retry = (err, attempt, res, rej, callback) -> | |
return rej(err) if attempt >= max_attempts | |
P.try -> | |
return unless err? |
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
var hunter = function () { | |
if ($("#fastHuntContainer a").css('visibility') == 'visible' && gamePage.resPool.resources[6].value < 500) { | |
console.log("Sending hunters..."); | |
$("#fastHuntContainer a").click(); | |
} | |
}; | |
var observer = function () { | |
if ($('#observeBtn').length > 0) { | |
console.log("Observing..."); | |
$('#observeBtn').click(); |
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
server { | |
listen 80; | |
server_name local.kuanyen.net; | |
gzip on; | |
gzip_min_length 1000; | |
location / { | |
root /opt/www; | |
index index.php; |
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 | |
#+----------------------------------------------------------------------------------------+ | |
#| This file is used to clean up traces from DigitalOcean *images* before being published.| | |
#+----------------------------------------------------------------------------------------+ | |
unset HISTFILE | |
files=(/root/.mysql_history /var/log/lastlog /root/.bash_history /var/log/wtmp /var/log/auth.log /var/log/messages /root/.viminfo) | |
for file in ${files[*]} | |
do |
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 | |
# See: https://github.com/deis/deis/pull/1825 | |
IMAGE=$1 | |
NEW_IMAGE=$HOST:$PORT/$2:$3 | |
NOW=$(date +"%m%d%Y%H%M%S") | |
if [ "$#" -ne 3 ]; then |
NewerOlder