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
#!/bin/bash | |
echo -ne "\e[34m" | |
echo -e "\e[41m \e[40m" | |
echo -e "\e[43m \e[40m" | |
echo -e "\e[45m \e[40m" | |
echo -ne "\e[0m" |
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
// main.zig | |
const std = @import("std"); | |
const warn = std.debug.warn; | |
const libcurl = @cImport(@cInclude("/usr/include/curl/curl.h")); | |
pub fn main() void { | |
var curl: *libcurl.CURL = libcurl.curl_easy_init(); | |
var res: libcurl.CURLcode = undefined; | |
var url = "https://example.com"; |
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
// The code | |
const http = @import("http.zig"); | |
const std = @import("std"); | |
const warn = std.debug.warn; | |
const libcurl = @cImport(@cInclude("/usr/include/curl/curl.h")); | |
pub fn main() void { | |
var curl: *libcurl.CURL = libcurl.curl_easy_init(); | |
var res: libcurl.CURLcode = undefined; |
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
// main.zig | |
const std = @import("std"); | |
const warn = std.debug.warn; | |
const libcurl = @cImport(@cInclude("/usr/include/curl/curl.h")); | |
pub fn main() void { | |
const curl = libcurl.curl_easy_init(); | |
warn("Hello, World!\n"); | |
} |
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
[----] I, [2018-11-13T09:26:35.931230 #891:4d4a0e0] INFO -- : Started POST "/ems_cloud" for 162.220.220.27 at 2018-11-13 09:26:35 -0500 | |
[----] I, [2018-11-13T09:26:35.936327 #891:4d4a0e0] INFO -- : Processing by EmsCloudController#create as JS | |
[----] I, [2018-11-13T09:26:35.936628 #891:4d4a0e0] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"removed", "button"=>"validate", "cred_type"=>"default", "name"=>"CirrusLabs [GCP]", "emstype"=>"gce", "project"=>"removed", "zone"=>"default", "service_account"=>"{\r\n \"type\": \"service_account\",\r\n \"project_id\": \"removed\",\r\n \"private_key_id\": \"removed\",\r\n \"private_key\": \"-----BEGIN PRIVATE KEY-----\\nREMOVED==\\n-----END PRIVATE KEY-----\\n\",\r\n \"client_email\": \"[email protected]\",\r\n \"client_id\": \"109022016564124963346\",\r\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\r\n \"token_uri\": \"https://accounts.google.com/o/oauth2/token\",\r\n \"auth_provider_x509_cert_ur |
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
#!/bin/bash | |
find . -type f exec sed -i -e 's/firstString/secondString/g' {} \; |
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
---------------------------------------------------------------------------------------------------------------------- | |
Total 11 MB/s | 1.1 GB 00:01:48 | |
Running transaction check | |
Running transaction test | |
Transaction check error: | |
file /usr/lib64/collectd/disk.so conflicts between attempted installs of collectd-disk-5.8.0-3.el7.x86_64 and collectd-5.8.0-3.el7.x86_64 | |
file /usr/lib64/collectd/write_http.so conflicts between attempted installs of collectd-write_http-5.8.0-3.el7.x86_64 and collectd-5.8.0-3.el7.x86_64 |
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
yes | pacman -Syu docker | |
systemctl start docker.socket | |
systemctl start docker.service | |
# RETURNS: | |
#Job for docker.service failed because the control process exited with error code. | |
# See "systemctl status docker.service" and "journalctl -xe" for details. | |
journalctl -xe | |
# Feb 28 09:58:39 systemd[1]: docker.service: Start request repeated too quickly. | |
# Feb 28 09:58:39 systemd[1]: docker.service: Failed with result 'exit-code'. | |
# Feb 28 09:58:39 systemd[1]: Failed to start Docker Application Container Engine. |
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 Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) | |
// My connection method | |
$connection = new mysqli($host, $dbuser, $pass, $dbname, $port); | |
var_dump($connection); // long live the connection errors | |
mysqli_close($connection); |
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
##Turn based ruby game | |
=begin | |
GOAL | |
Write a simple game that allows the user and the computer to take turns selecting moves to use against each other. | |
Both the computer and the player should start out at the same amount of health (such as 100), | |
and should be able to choose between the three moves: | |
The first move should do moderate damage and has a small range (such as 18-25). |
NewerOlder