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
javascript:function() { | |
var subject = prompt('(Optional) What is the subject?', 'Reminder'); | |
var time = "1 day"; | |
var optMsg = prompt('OPTIONAL (click OK to skip)\nEnter message/notes:'); | |
var message = '[' + location.href + ']' + '\n\nRemindMe! ' + time; | |
if (optMsg == "") { | |
var newLink = 'https://www.reddit.com/message/compose/?to=RemindMeBot&subject=' + encodeURIComponent(subject) + '&message=' + encodeURIComponent(message); | |
} else { | |
var newLink = 'https://www.reddit.com/message/compose/?to=RemindMeBot&subject=' + encodeURIComponent(subject) + '&message=' + encodeURIComponent(message) + ' %22' + optMsg + '%22'; |
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 ruby | |
def guess(solution) | |
loop do | |
response = gets.to_i | |
if response == solution | |
puts "Bravo ! 🎇" | |
break | |
else | |
puts "Caramba, encore raté" |
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 'octokit' | |
require 'mixlib/shellout' | |
require 'pry' | |
def get_token | |
client = Octokit::Client.new(login: ENV['GITHUB_USERNAME'], password: ENV['GITHUB_PASSWORD']) | |
client.create_authorization(:scopes => ["user", 'repo'], :note => "demo4", | |
:headers => { "X-GitHub-OTP" => ENV['OTP'] }) # OTP is my one-time password for 2FA | |
end |
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
Desktop is 1920 x 1080 @ 60 Hz | |
Initialize engine version: 2018.2.1f1 (1a9968d9f99c) | |
GfxDevice: creating device client; threaded=1 | |
Renderer: Mesa DRI Intel(R) Haswell Mobile | |
Vendor: Intel Open Source Technology Center | |
Version: 4.5 (Core Profile) Mesa 18.1.7 | |
GLES: 0 | |
GL_3DFX_texture_compression_FXT1 GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_trinary_minmax GL_AMD_vertex_shader_layer GL_AMD_vertex_shader_viewport_index GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_APPLE_object_purgeable GL_ARB_ES2_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_compatibility GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_compressed_texture_pixel_storage GL_ARB_compute_shader GL_ARB_conditional_render_inverted GL_ARB_conservative_depth GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ |
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/python | |
import time, datetime | |
import sys | |
from signal import * | |
signals = { | |
SIGABRT: 'SIGABRT', | |
SIGALRM: 'SIGALRM', | |
SIGBUS: 'SIGBUS', |
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
{ "id": "consul-gateway", | |
"cmd": "consul-template -consul consul_server:8500 -template \"template:instances\" -once && python mini_webserver.py & pid=$! && consul-template -consul consul_server:8500 -template \"template:instances:pkill -USR1 $pid\"", | |
"cpus": 0.1, | |
"mem": 128, | |
"instances": 1, | |
"ports": [0], | |
"uris": [ | |
"https://gist.githubusercontent.com/kamaradclimber/c2dc3188ee0b302e06a2/raw/fcb7aa624376b9d4216bf388de462bf4436a48e6/mini_webserver.py", | |
"https://releases.hashicorp.com/consul-template/0.12.0/consul-template_0.12.0_linux_amd64.zip" | |
] |
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 | |
repo=$1 | |
integration_branch=$2 | |
ignore=master | |
function test_rebase() { | |
integration_branch=$1 | |
git rebase $integration_branch > /dev/null 2>&1 |
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
user 'consul' do | |
comment "Service user for consul" | |
gid 'consul' | |
shell '/bin/false' | |
system true | |
end |
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 only generates completion for subcommands | |
# Any help to generate options and arguments is welcome | |
# the main objective of this file is to remain readable | |
_generate_knife() | |
{ | |
bundle exec knife | grep ^knife | sed 's/[\\([A-Z].*//' | sed -re 's/^\s+//' |
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
Maybe = Struct.new(:value) do | |
def if_some(&block) | |
if value.nil? | |
Maybe.new(nil) | |
else | |
block.call(value) | |
end | |
end | |
def method_missing(*args, &block) |
NewerOlder