Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
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
pragma solidity ^0.4.0; | |
import './SafeMath.sol'; | |
/** | |
* Here is an example of upgradable contract, consisting of three parts: | |
* - Data contract keeps the resources (data) and is controlled by the Handler contract; | |
* - Handler contract (implements Handler interface) defines operations and provides services. This contract can be upgraded; | |
* - Upgrader contract (optional) deals with the voting mechanism and upgrades the Handler contract. The voters are pre-defined | |
* by the contract owner. |
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
from typing import Dict | |
BASE_URL = "http://www.meteofrance.com/mf3-rpc-portlet/js/datas/zones_AVDEPT{}.json" | |
DEPTS = ("73", "74", "05", "38") | |
import requests | |
from geojson import Feature, FeatureCollection | |
def get_area(dept: str) -> Dict: | |
r = requests.get(BASE_URL.format(dept)) |
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 | |
/** | |
* Plugin Name: Another Syntax Highlighter | |
* Version: 0.1 | |
* Plugin URI: https://norbertvajda.wordpress.com/ | |
* Description: Just another syntax highligher plugin. It works with prism.js (https://prismjs.com/). | |
* Author: Norbert Vajda | |
* Author URI: https://norbertvajda.wordpress.com/ | |
* Network: false | |
* Text Domain: ash |
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 | |
URL='https://www.google.com/search?q=' | |
QUERY=$(echo '' | dmenu -p "Search:") | |
if [ -n "$QUERY" ]; then | |
firefox "${URL}${QUERY}" 2> /dev/null | |
exec i3-msg [class="^Firefox$"] focus | |
fi |
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 merge_lists(aList, bList): | |
if not aList or not bList: | |
print("empty lists") | |
return aList + bList | |
c = [] | |
while aList and bList: | |
if aList[0] < bList[0]: | |
c.append(aList.pop(0)) | |
else: |
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
import kotlinx.coroutines.delay | |
fun main() { | |
fireAndForget() | |
} | |
/* C# | |
public static async Task Main(string[] args) | |
{ | |
fireAndForget(); |
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
########## | |
# Win10 Optimization Script With Extra GPD Win Tweaks | |
# Adapted version of https://github.com/Disassembler0/Win10-Initial-Setup-Script by Disassembler <[email protected]> | |
# Author: BlackDragonBE | |
# Version: v2.2.1 (2017-12-02) | |
# Copied from https://www.reddit.com/r/gpdwin/comments/6ipa6c/windows_10_optimization_script_for_gpd_win/ | |
########## | |
# As a workaround for disabled script execution, run this command (without #) in an elevated PowerShell windows first and choose "all" if you're asked where to apply this: | |
# Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.