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
// Your init script | |
// | |
// Pulsar will evaluate this file each time a new window is opened. It is run | |
// after packages are loaded/activated and after the previous editor state | |
// has been restored. | |
// | |
// An example hack to log to the console when each text editor is saved. | |
// | |
// atom.workspace.observeTextEditors(editor => | |
// editor.onDidSave(() => |
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
#lang htdp/bsl | |
;; #reader(lib "htdp-beginner-reader.ss" "lang")((modname area-tests) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) | |
;; Given length of one side of square, produce the area of the square. | |
(check-expect (area-of-square 3) 3) ;; This test is wrong. | |
(check-expect (area-of-square 3.2) (* 3.2 3.2)) | |
(define (area-of-square side) | |
(* side side)) |
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 | |
// Thanks to: http://cubiq.org/the-perfect-php-clean-url-generator | |
function toAscii( $str, $replace = array(), $delimiter = '-' ) { | |
if( ! empty( $replace ) ) { | |
$str = str_replace( ( array ) $replace, ' ', $str); | |
} | |
$clean = iconv( 'UTF-8', 'ASCII//TRANSLIT', $str ); | |
$clean = preg_replace( "/[^a-zA-Z0-9\/_|+ -]/", '', $clean ); |
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
“I fear not the man who has practiced 10,000 kicks once, but I fear the | |
man who has practiced one kick 10,000 times.” | |
— Bruce Lee | |
“Eu não temo o homem que pratiou 10.000 chutes uma vez, mas sim do | |
homem que praticou um chute 10.000 vezes.” | |
“Se quiser testar o caráter de uma pessoa, dê poder a ela.” | |
— Abraham Lincoln |
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
[{"enabled":true,"onLoad":true,"selector":"orgmode\\.org","code":{"js":"// Type your JavaScript code here.\n\n","css":"/* Type your CSS code here. */\n\nbody {\n max-width: 1024px;\n border: 1px #a09a98 dashed;\n padding: 12px;\n font-family: Ubuntu;\n}\n\npre, code, samp, tt {\n font-family: 'Source Code Pro';\n font-weight: 300;\n}\n","html":"<!-- Type your HTML code here. -->\n\n","files":[]}},{"enabled":true,"onLoad":true,"selector":"https://www.gnu.org/software/coreutils/manual/coreutils.html","code":{"js":"// Type your JavaScript code here.\n\n","css":"/* Type your CSS code here. */\n\nbody {\n max-width: 1024px;\n}","html":"<!-- Type your HTML code here. -->\n\n","files":[]}},{"enabled":true,"onLoad":true,"selector":"https://www.gnu.org/software/bash","code":{"js":"// Type your JavaScript code here.\n\n","css":"/* Type your CSS code here. */\n\nbody {\n max-width: 1024px;\n}\n\n.example pre {\n font-family: 'Source Code Pro';\n}","html":"<!-- Type your HTML code here. -->\n\n |
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
$ sudo pacman -Syyu | |
[sudo] password for fernando: | |
:: Synchronizing package databases... | |
core 132.8 KiB 305K/s 00:00 [################################################] 100% | |
extra 1705.4 KiB 2.47M/s 00:01 [################################################] 100% | |
community 4.9 MiB 2.91M/s 00:02 [################################################] 100% | |
multilib 169.5 KiB 12.7M/s 00:00 [################################################] 100% | |
:: Starting full system upgrade... | |
resolving dependencies... | |
looking for conflicting packages... |
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
// Procedural | |
const getPhoneAreaAndNumber = ({ whatsappPhone, cellPhone, homePhone }) => { | |
if (whatsappPhone && isCellPhone(whatsappPhone)) return { area: getPhoneArea(whatsappPhone), number: getPhoneNumber(whatsappPhone) } | |
if (cellPhone && isCellPhone(cellPhone)) return { area: getPhoneArea(cellPhone), number: getPhoneNumber(cellPhone) } | |
if (homePhone && isCellPhone(homePhone)) return { area: getPhoneArea(homePhone), number: getPhoneNumber(homePhone) } | |
return { area: '', number: '' } | |
} | |
// We can turn the above into this: |
*nix is much better for development in general, and those who disagree are just plain wrong (in my supreme opinion). Still, sometimes we are forced to work on Windows (someone from “above” orders such an unspeakable thing, and the others, lesser human beings are oblidged to comply).
Download: Ruby Installer Downloads
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 p = console.log.bind(console); | |
/////////////////////////////////////////////////////////////////////////////// | |
let nums = [3, 12, 21, 27, 44]; | |
let odds = nums.filter(num => num % 2 != 0); | |
p(odds); | |
// → [ 3, 21, 27 ] |
NewerOlder