Skip to content

Instantly share code, notes, and snippets.

@mjsxi
mjsxi / SassMeister-input.scss
Last active August 25, 2015 19:21
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
/* first test */
$small: nothing; // fallback for images not uploaded
@mixin testSmall($s: null) {
@if ($s == nothing) {
<?php
/*
* WP_Query - Show in your result search page, How many, products were found.
*/
$mySearch =& new WP_Query("s=$s & showposts=-1"); $num = $mySearch->post_count; ?>
<h1 class="page-title search-products-alert">
Foram encontrados <strong><?php echo $num;?></strong> resultados para a busca: <strong><?php echo get_search_query(); ?></strong>
</h1>
/*** inside Angular **/
var someService = function($q, $http) {
var service = this;
service.findSomething = function(query) {
var somePromise = $q.defer()
$http.get(/*something well done here */).then(function(data){
somePromise.resolve(data);
@ballance
ballance / The Technical Interview Cheat Sheet.md
Last active August 25, 2015 19:27 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
.hidden-sm,
.hidden-md,
.hidden-lg {
.show;
}
.hidden-sm {
@media (max-width: @screen-sm) {
.hide;
}
for (var i = 1; i < 101; i ++){
if (i % 15 == 0){
console.log('FizzBuzz');
}
else if (i % 5 == 0) {
console.log('Buzz');
}
else if (i % 3 == 0) {
console.log ('Fizz');
}
@firebellys
firebellys / The Technical Interview Cheat Sheet.md
Last active August 25, 2015 19:29 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dhoss
dhoss / DALSpec.scala
Created August 25, 2015 19:30
reducing with... stuff
"retrieve the correct page when specified" in new WithApplication
with RepositoryTable
with CommitTable
with ProjectTable
with WithDatabaseConfig
with DBCleanup
with DBFixtures {
import driver.api._
//create an instance of the table
val Projects = TableQuery[Projects]
getFlashVersion: function() {
// ie
try {
try {
var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
try { axo.AllowScriptAccess = 'always'; } catch(e) { return '6,0,0'; }
} catch(e) {}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
} catch(e) {
try {