Skip to content

Instantly share code, notes, and snippets.

View mvrilo's full-sized avatar
🌳

Murilo Santana mvrilo

🌳
View GitHub Profile
function childFind(selector, which) {
if (!this || !this.length) return $([]);
which = (which || 'previous') + 'Sibling';
var element = this[0][which];
while (element && (element.nodeType !== 1 || !$(element).is(selector))) element = element[which];
return $(element);
func Shift(list []string) (string, []string) {
return list[0], list[1:len(list)]
}
package main
import (
"crypto/md5"
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
)
package main
import (
"sync"
"time"
)
func main() {
wg := new(sync.WaitGroup)
for _, i := range []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} {
package main
import "net"
// inspired by disqus.com/humans.txt
const bender = `
.-.
( )
'-'
J L
package main
import (
"bytes"
"compress/gzip"
"io/ioutil"
)
type File struct {
path string
package main
import (
"fmt"
p "github.com/kr/pretty"
)
func main() {
type myType struct {
c []byte
cat() {
if [ "`which pygmentize`" = "" ]; then
/bin/cat $@
return
fi
pygmentize $@ 2> /dev/null
[ $? -ne 0 ] && /bin/cat $@
}

Keybase proof

I hereby claim:

  • I am mvrilo on github.
  • I am murilo (https://keybase.io/murilo) on keybase.
  • I have a public key whose fingerprint is 0A03 A6A8 DF50 F4E8 2344 0394 3C84 58DE 0ABD AE4E

To claim this, I am signing this object:

-(void)setAmbient:(id)args
{
NSError* error = nil;
BOOL success = [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: &error];
if (!error || !success) {
DebugLog(@"Could not set category");
}
}
-(void)setAmbientDuckOthers:(id)args