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
#!/bin/bash | |
# backend/run | |
echo -n -e "\033]0;Rails\007" | |
foreman start | |
echo -n -e "\033]0;\007" |
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
/** | |
* Extend Recent Posts Widget | |
* | |
* Adds different formatting to the default WordPress Recent Posts Widget | |
*/ | |
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts { | |
function widget($args, $instance) { | |
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
defmodule Spawner do | |
def process() do | |
receive do | |
after | |
1_000 -> | |
IO.puts "1 seconds elapsed" | |
for i <- 0..40, i > 0 do | |
Task.start(ModuleName, :func_name, [[key: value]]) | |
end |
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
int main() | |
{ | |
// Variable declaration | |
int choice; | |
// Print the main menu | |
cout << "CMPT 126 - Assignment 1\n"; | |
cout << "\nPlease select one of the followings:\n"; | |
cout << "1\tQuadratic equation solver.\n"; | |
cout << "2\tReverse an integer and sum its digits.\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
// Twitter Feed | |
add_shortcode( 'twitter', 'rl_twitter_feed' ); | |
function rl_twitter_feed( $atts ) { | |
// Attributes | |
if( isset( $atts['handle'] ) ) | |
$handle = $atts['handle']; | |
// Check transients | |
$body = get_transient( 'rl_twitter_data' ); |
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
git rm --cached myFile.ext |
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
/** | |
* Converts hexidecimal to rgb format | |
*/ | |
function lab_hex_to_rgb( $hex, $opacity = 1 ) { | |
$hex = str_replace( '#', '', $hex ); | |
// if in 3 digit format | |
if( strlen( $hex ) == 3) { |
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
App.Store = DS.Store.extend({ | |
revision : 11, | |
adapter : DS.RESTAdapter.create({ | |
url : 'https://proposals.firebaseio.com' | |
}), | |
}); |
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
$white : #FFF; | |
$off-white : #F7F7F7; | |
$light-grey : #EAEAEA; | |
$grey : #CCCCCC; | |
$darker-grey : #828282; | |
$dark-grey : #424242; | |
$off-black : #222; | |
$black : #000; | |
$light-blue : #45C6F0; |
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
Ctrl + A Go to the beginning of the line you are currently typing on | |
Ctrl + E Go to the end of the line you are currently typing on | |
Ctrl + L Clears the Screen, similar to the clear command | |
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line. | |
Ctrl + H Same as backspace | |
Ctrl + R Let’s you search through previously used commands | |
Ctrl + C Kill whatever you are running | |
Ctrl + D Exit the current shell | |
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it. | |
Ctrl + W Delete the word before the cursor |
NewerOlder