Skip to content

Instantly share code, notes, and snippets.

View ruslanashaari's full-sized avatar
🎯
Focusing

Ruslan Ashaari ruslanashaari

🎯
Focusing
  • Tata Consultancy Services
  • Kuala Lumpur
View GitHub Profile
@ruslanashaari
ruslanashaari / rna-transcription.php
Created September 8, 2017 00:27
Given a DNA strand, return its RNA complement (per RNA transcription) #exercism
<?php
function toRna($nucleotides) {
$dnaToRna = [
"G" => "C",
"C" => "G",
"T" => "A",
"A" => "U"
];
return strtr(strtoupper($nucleotides), $dnaToRna);
@ruslanashaari
ruslanashaari / raindrops.php
Created September 8, 2017 00:17
Convert a number to a string, the contents of which depend on the number's factors. #exercism
<?php
function raindrops($drops) {
$output = '';
if ($drops%3 == 0) {
$output .= "Pling";
}
if ($drops%5 == 0) {
@ruslanashaari
ruslanashaari / plivo_curl.php
Created August 30, 2017 10:20 — forked from tsudot/plivo_curl.php
Send an SMS using curl through Plivo.
<?php
# Plivo AUTH ID
$AUTH_ID = '';
# Plivo AUTH TOKEN
$AUTH_TOKEN = '';
# SMS sender ID.
$src = '';
@ruslanashaari
ruslanashaari / gist:dc15cf0b35e41726e9973d653b7bb25d
Created August 16, 2017 16:48
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after