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
| # VTE | |
| apt-get install autoconf libglib2.0-dev gtk-doc-tools libpcre2-dev libgirepository1.0-dev gperf libvte-2.91-dev libvte-dev valac unzip | |
| wget https://github.com/thestinger/vte-ng/archive/0.46.0.a.zip | |
| unzip 0.46.0.a.zip | |
| rm 0.46.0.a.zip | |
| cd vte-ng-0.46.0.a | |
| bash autogen.sh | |
| make && make install | |
| cd ~ | |
| rm -rf vte-ng-0.46.0.a/ |
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
| <?php | |
| ob_start(); | |
| var_dump($_POST); | |
| $output = ob_get_clean(); | |
| $outputFile = "var_dump_output.txt"; | |
| $filehandle = fopen($outputFile, 'a') or die("File creation error.""); | |
| fwrite($fileHandle, $output); | |
| fclose($fileHandle); |
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
| sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | gdisk /dev/sda | |
| n # new partition | |
| 1 # partition number 1 | |
| 2048 # first sector | |
| 4095 # end sector | |
| ef02 # BIOS boot partition | |
| n # new partition | |
| 2 # partition number 2 | |
| 4096 # first sector | |
| 1028095 # end sector |
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
| def request(linode_method, query_args = {}) | |
| begin | |
| args = { | |
| api_key: @api_key, | |
| api_action: linode_method, | |
| }.merge(query_args).map{|k,v| "#{k}=#{v}"}.compact.join('&') | |
| uri = URI("https://api.linode.com/?#{args}") | |
| http = Net::HTTP.new(uri.host, uri.port) |
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
| def deep_munge(hash) | |
| hash.each do |k, v| | |
| case v | |
| when Array | |
| v.grep(Hash) { |x| deep_munge(x) } | |
| v.compact! | |
| hash[k] = nil if v.empty? | |
| when Hash | |
| deep_munge(v) | |
| end |
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
| class PasswordChange | |
| include ActiveModel::Model | |
| attr_accessor( | |
| :user, | |
| :current_password, | |
| :new_password, | |
| :new_password_confirmation, | |
| ) |
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
| $(document).ready(function(){ | |
| $(".zoomable").click (function() { | |
| if($(this).height() == 480){ | |
| $(this).animate({ | |
| height: '980', | |
| width: '980' | |
| }); | |
| }else{ | |
| $(this).animate({ | |
| height: '480px', |
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
| set -eux | |
| set -o pipefail | |
| # ! #<Blocks::Base::Builder:0x007f8b2d2f3ef0> ------------------------------------- | |
| if [ ! -f /root/system_setup_complete ]; then | |
| apt-get update | |
| apt-get -y install aptitude | |
| aptitude -y full-upgrade | |
| fi | |
| echo "wilmut.example.com" > /etc/hostname | |
| hostname -F /etc/hostname |
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
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| require 'json' | |
| DIRECTORY_NAME = '/Users/kaspergrubbe/Pictures/screenie/' | |
| API_KEY = '' | |
| URL = 'https://cdn.servnice.com/screenie' | |
| unless File.directory?(DIRECTORY_NAME) |
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
| def test | |
| puts "Hello" | |
| end | |
| => nil | |
| Object.test | |
| => NoMethodError: private method 'test' called for Object:Class | |
| Object.send(:test) | |
| Hello |