const shade = 100;
type Shade = 100;
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
--- | |
# ansible 2.9.0 | |
- name: Deploy to production | |
hosts: production | |
remote_user: user | |
vars: | |
app_root: /home/user/apps/my_app | |
tasks: |
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
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
We should have at least three files: 'Widget.svelte', 'rollup.config.js' and 'package.json':
- Our widget
Widget.svelte
:
<script>
export let name;
</script>
<h1>Hello {name}!</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
def join_game(user_id, game_id) do | |
with {:ok, user} <- Users.get(user_id), | |
{:ok, game} <- Games.get(game_id), | |
false <- Game.is_full?(game), | |
false <- Game.is_started?(game), | |
true <- User.has_permission?(user, game) | |
do | |
Game.add_user(game, user) | |
else | |
# Don't care what specific thing failed |
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
http://www.youtube.com/watch?v=-wtIMTCHWuI | |
http://youtube.com/watch?v=-wtIMTCHWuI | |
http://m.youtube.com/watch?v=-wtIMTCHWuI | |
https://www.youtube.com/watch?v=lalOy8Mbfdc | |
https://youtube.com/watch?v=lalOy8Mbfdc | |
https://m.youtube.com/watch?v=lalOy8Mbfdc | |
http://www.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail | |
http://youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail | |
http://m.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail |
- From 10.11 or 10.12 systems, format an external hard drive with at least 500gb with "Mac Os Extended Journaled".
- Download High Sierra Beta and install it in the external hard drive.
- When the system reboots and finishes installation, it will boot from the external HD.
Go to Preferences and change
Startup Disk
to be main HD. - Reboot and press
Option
key when the computer makes a beep and select external HD to boot from it. - Once booted again into external HD, format main HD to be APFS.
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
For troubleshooting, two things to first try: | |
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg | |
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working | |
If that all looks all right, one next thing to try: | |
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry | |
If after that install and you re-try git commit and still get the "failed to sign the data" error: | |
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung |
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 | |
function cif_validation ($cif) { | |
$cif = strtoupper($cif); | |
if (preg_match('~(^[XYZ\d]\d{7})([TRWAGMYFPDXBNJZSQVHLCKE]$)~', $cif, $parts)) { | |
$control = 'TRWAGMYFPDXBNJZSQVHLCKE'; | |
$nie = array('X', 'Y', 'Z'); | |
$parts[1] = str_replace(array_values($nie), array_keys($nie), $parts[1]); | |
$cheksum = substr($control, $parts[1] % 23, 1); | |
return ($parts[2] == $cheksum); | |
} elseif (preg_match('~(^[ABCDEFGHIJKLMUV])(\d{7})(\d$)~', $cif, $parts)) { |
NewerOlder