-
Start the Ubuntu Server VM and insert the Guest Additions CD image (Devices menu, Install Guest Additions).
-
Mount CD Rom:
$ sudo mount /dev/cdrom /media/cdrom
-
Install necessary build tools and dependencies:
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
<?php | |
/** | |
* hldsStatus class file. | |
* | |
* Check hlds status and calculate latency. | |
* | |
* @author Alexandru G. | |
* @link http://www.gentle.ro/ | |
* @version 0.1.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
// paste in browser address bar: | |
javascript: var p=r(); function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k<w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert('Password not found in ' + g + ' forms');}function z(f){var b=false;for(var i=0;i<f.length;i++) {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s='';if (ej.type=='password'){s=ej.value;if (s!=''){prompt('Password found ', s)}else{alert('Password is blank')}return true;}} |
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
def pop(initial_state, time): | |
state_cnt = [initial_state.count(i) for i in range(0, 9)] | |
for _ in range(0, time): | |
state_cnt = state_cnt[1:] + state_cnt[:1] | |
state_cnt[6] += state_cnt[8] | |
return sum(state_cnt) | |
def partOne(data): | |
return pop(data, 80) |
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 sh | |
# | |
# Search packagist.org from CLI with support for sorting results by the number | |
# of downloads or favorites. | |
# | |
# Temporary solution for https://github.com/composer/packagist/issues/365 | |
# | |
# Dependencies: | |
# - [curl](http://curl.haxx.se/) | |
# - [jq](http://stedolan.github.io/jq/) |
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
{ | |
"oauth_consumer_key": "XXX", | |
"oauth_consumer_secret": "XXX", | |
"access_token": "XXX", | |
"access_token_secret": "XXX" | |
} |
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
pub const Box = struct { | |
field: i32, | |
}; | |
pub fn main() void { | |
var box = Box { .field = 0 }; | |
box.*.field = 1; // crash aici | |
var boxPtr = &box; |
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
sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" | |
sudo apt-get update | |
sudo apt-get install skype && sudo apt-get -f install |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Deploy in progress. Please try again in few minutes</title> | |
<style type="text/css" /> | |
body {color: #666; text-align: center; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; sans-serif; margin:0; width: 800px; margin: auto; font-size: 14px; } | |
h1 { font-size: 56px; line-height: 100px; font-weight: normal; color: #456; } | |
h2 { font-size: 24px; color: #666; line-height: 1.5em; } | |
h3 { color: #456; font-size: 20px; font-weight: normal; line-height: 28px; } | |
hr { margin: 18px 0; border: 0; border-top: 1px solid #EEE; border-bottom: 1px solid white; } |
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
<?php | |
// src/Foobar/Controller/FooController.php | |
namespace Foobar\Controller; | |
class FooController | |
{ | |
public function helloAction($request) | |
{ |
NewerOlder