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 python3 | |
import sys | |
number_of_args = len(sys.argv) | |
f = open("/etc/hosts", "a+") | |
for i in range(number_of_args - 1): | |
f.write("127.0.0.1 %s\n" % sys.argv[i + 1]) | |
# To use: |
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
/* | |
Copyright 2016 DSP Synthesizers Sweden. | |
Author: Jan Ostman | |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
See the GNU General Public License for more details. | |
*/ | |
#include "wiring.h" | |
#include "LPC8xx.h" |
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
import bpy | |
from bpy.types import Panel, EnumProperty, WindowManager | |
import bpy.utils.previews | |
import os | |
# UI | |
class PreviewsExamplePanel(bpy.types.Panel): | |
bl_label = "Previews Example Panel" | |
bl_idname = "OBJECT_PT_previews" |
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
upstream gitlab { | |
server 172.17.42.1:10080 fail_timeout=0; | |
} | |
# let gitlab deal with the redirection | |
server { | |
listen 80; | |
server_name git.example.com; | |
server_tokens off; | |
root /dev/null; |
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 | |
require 'optparse' | |
options = {} | |
# Markers | |
JPEG_START = 'ffda' | |
JPEG_END = 'ffd9' | |
OptionParser.new do |opts| |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |