Skip to content

Instantly share code, notes, and snippets.

🏃
Getting ready to break a world record

Alexander Alemayhu scanf

🏃
Getting ready to break a world record
Block or report user

Report or block scanf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View notify-site-is-down.rb
# /usr/bin/notify-site-is-down.rb
require "rubygems"
require "twilio-ruby"
account_sid = ENV["TWILIO_ACCOUNT_SID"]
auth_token = ENV["TWILIO_AUTH_TOKEN"]
@client = Twilio::REST::Client.new account_sid, auth_token
@scanf
scanf / x.md
Created Sep 6, 2019
markdown test
View x.md

single line snippet

@scanf
scanf / without-newline.imba
Created Aug 21, 2019
Log without a newline in Imba
View without-newline.imba
# Inside of a script you can always do
process:stdout:write("Hei")
@scanf
scanf / install-requires.js
Created Aug 8, 2019
Install all of the requires from a Javascript file using yarn
View install-requires.js
const { execFile } = require('child_process');
const fs = require('fs');
fs.readFile('./input-file.js', (err, data) => {
if (err) throw err;
let payload = data.toString();
let lines = payload.split('\n').filter(x => x.includes('require'));
let requires = lines.map(x => x.split('require')[1]);
let modules = requires.map(x => x.split("'")[1]);
@scanf
scanf / client.js
Created Jul 25, 2019
Compiled Javascript of imba/hello-world-imba https://github.com/imba/hello-world-imba.git
View client.js
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@scanf
scanf / uuid.alemayhu.service
Created Jul 7, 2019
Deno Systemd service file for uuid.alemayhu.com
View uuid.alemayhu.service
[Unit]
Description=uuid.alemayhu.com - generating random UUID's
Documentation=https://uuid.alemayhu.com
After=network.target
[Service]
Type=simple
User=scanf
WorkingDirectory=/home/scanf/src/github.com/scanf/uuid.alemayhu.com/src
ExecStart=/home/scanf/.deno/bin/deno run --allow-read --allow-net main.ts
View gist:79a577755a4b78171fcea4d03b9dca6f
module.exports = function Next(views, sViews, body) {
const directions = ['forward', 'right', 'left'];
const treatMatch = views.find(v => { return v == "treat"});
if (treatMatch) {
return treatMatch.direction;
}
let possibleActions = directions;
View testing-snake.ts
module.exports = function Next(views, sViews, body) {
const directions = ['up', 'down', 'right', 'left'];
const treatMatch = views.find(v => { return v == "treat"});
if (treatMatch) {
return treatMatch.direction;
}
let possibleActions = directions;
View gist:a6d15ba33b219daf2b99f6bb8759be61
module.exports = function Next(views, sViews, body) {
const directions = ['up', 'down', 'right', 'left'];
const treatMatch = views.find(v => { return v == "treat"});
if (treatMatch) {
return treatMatch.direction;
}
let possibleActions = directions;
View secret.json
{
"config": {
"autoconnect": true,
"bot": "awesomo_bot",
"name": "#ccscanf",
"oauth": "oauth:xyz”,
"prefix": "\\",
"silent": false,
"standupReminder": true,
"windowState": {
You can’t perform that action at this time.