- Dynamic Dispatch
- Dynamic Method
- Ghost Methods
- Dynamic Proxies
- Blank Slate
- Kernel Method
- Flattening the Scope (aka Nested Lexical Scopes)
- Context Probe
- Class Eval (not really a 'spell' more just a demonstration of its usage)
- Class Macros
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
body { | |
font-size: 5vw; | |
} | |
@media (max-width: 700px) { | |
body { | |
font-size: 35px; | |
} | |
} | |
@media (min-width: 3000px) { | |
body { |
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
Show hidden characters
{ | |
"presets": [ | |
"@babel/preset-env", | |
"@babel/preset-react" | |
] | |
} |
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
mod time_diff; | |
use time_diff::TimeDiff; | |
fn main() { | |
let td = TimeDiff::new(1234123); | |
let td2 = TimeDiff::new(1233); | |
println!("First diff is {}", td); | |
println!("Second diff is {}", td2); | |
println!("Sum of that diffs is {}", td + td2); |
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !
myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
let
(a,b,c) = myTuple
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
/** | |
* Workaround for PHP < 5.1.6 | |
*/ | |
if (!function_exists('json_encode')) { | |
function json_encode($data) { | |
switch ($type = gettype($data)) { | |
case 'NULL': | |
return 'null'; | |
case 'boolean': | |
return ($data ? 'true' : 'false'); |
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
$.ajaxSetup({ | |
beforeSend: function(xhr, settings) { | |
if (settings.type == 'POST' || settings.type == 'PUT' || settings.type == 'DELETE') { | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = jQuery.trim(cookies[i]); | |
// Does this cookie string begin with the name we want? |
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
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHYAMnK0x4q12K7UqeR7sd6joJN9LgGc1d6XQhg/eOUD viktor@gentoo |
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
<h1 class="loader"> | |
<span>З</span> | |
<span>а</span> | |
<span>г</span> | |
<span>р</span> | |
<span>у</span> | |
<span>з</span> | |
<span>к</span> | |
<span>а</span> | |
</h1> |
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
<h1 class="text"><span>Gradient 3D text</span></h1> | |
<style> | |
body { | |
background-color: #272727; | |
} | |
h1 { | |
font-family: "Arial", sans-serif; | |
font-size: 85px; | |
text-align: center; |
NewerOlder