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
# Deploy your site with git | |
This gist assumes: | |
* you have an online remote repository (github / bitbucket etc.) | |
* you have a local git repo | |
* and a cloud server (Rackspace cloud / Amazon EC2 etc) | |
* your (PHP) scripts are served from /var/www/html/ | |
* your webpages are executed by Apache | |
* the Apache user is named `www-data` (may be `apache` on other systems) |
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
// Here You can type your custom JavaScript... | |
const seasonWords = [ | |
"Season", | |
"S0", | |
"S1", | |
"S2", | |
"S3", | |
"S4", |
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
[root@Fedora-30]# cat /boot/grub2/grub.cfg | |
# | |
# DO NOT EDIT THIS FILE | |
# | |
# It is automatically generated by grub2-mkconfig using templates | |
# from /etc/grub.d and settings from /etc/default/grub | |
# | |
### BEGIN /etc/grub.d/00_header ### |
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 python | |
import re | |
maps_file = open("/proc/3778/maps", 'r') | |
mem_file = open("/proc/3778/mem", 'r', 0) | |
for line in maps_file.readlines(): # for each mapped region | |
m = re.match(r'([0-9A-Fa-f]+)-([0-9A-Fa-f]+) ([-r])', line) | |
if m.group(3) == 'r': # if this is a readable region | |
start = int(m.group(1), 16) | |
end = int(m.group(2), 16) | |
mem_file.seek(start) # seek to region start |
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
Running a modified ( for logging ) fork of https://github.com/AMDESE/linux/tree/sev-es-4.19 | |
/lib/firmware/amd/amd_sev_fam17h_model0xh.sbin | |
firmware versions 0.17 - build 11 ( from latest kernel ) | |
firmware versions 0.17 - build 22 ( from developer.amd.com ) | |
Both result in "Failed to update SEV firmware: 0x8003" | |
[ 9.774804] ccp 0000:65:00.1: enabled |
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
pragma solidity ^0.5.0; | |
contract Base { | |
string name = "Parent Name"; | |
constructor() public { | |
} | |
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
const BN = require( 'bn.js' ); | |
import { util as OfficialUtil } from 'zilliqa-js'; | |
import { Zilliqa } from 'zilliqa-js'; | |
const zilliqa = new Zilliqa({ | |
nodeUrl: 'http://localhost:4200', | |
}); | |
const privateKey = "db11cfa086b92497c8ed5a4cc6edb3a5bfe3a640c43ffb9fc6aa0873c56f2ee3"; | |
const myCode = ""; |
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
pragma solidity ^0.4.17; | |
/** | |
* @title ERC20Basic | |
* @dev Simpler version of ERC20 interface | |
* @dev see https://github.com/ethereum/EIPs/issues/179 | |
*/ | |
contract ERC20Basic { | |
function totalSupply() public view returns (uint256); | |
function balanceOf(address who) public view returns (uint256); |
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
pragma solidity ^0.4.22; | |
// @mickys - based on https://gist.github.com/holiman/069de8d056a531575d2b786df3345665 | |
contract Replicator { | |
address public parent; | |
function replicate() public returns(address) { | |
address childAddress = clone(address(this)); | |
Replicator child = Replicator(childAddress); | |
child.setParent(address(this)); |
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
pragma solidity ^0.4.17; | |
contract TokenSCADAVariable { | |
Funding FundingEntity; | |
bool public SCADA_requires_hard_cap = true; | |
function TokenSCADAVariable( address _fundingContract ) public { |
NewerOlder