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
#!/usr/bin/env ruby | |
# A script to create a review on crucible based on the current git branch and | |
# youtrack ticket. | |
# | |
# To configure settings, create a file named .code-review in your home directory | |
# The format should be: | |
# ------------------------------------------------------------------------------ | |
# crucible: | |
# url: <crucible url> | |
# username: <username> |
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
http://stackoverflow.com/questions/8481138/how-to-use-sendmsg-to-send-a-file-descriptor-via-sockets-between-2-processes | |
http://stackoverflow.com/questions/1997622/can-i-open-a-socket-and-pass-it-to-another-process-in-linux | |
http://www.normalesup.org/~george/comp/libancillary/ | |
http://man7.org/tlpi/code/online/dist/sockets/scm_rights_send.c.html |
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
/usr/bin/tshark -r some.cap.gz -T fields -e ip.dst -e udp.port -R "udp" > output.txt | |
/usr/bin/tshark -R ip.addr==1.1.1.1 -r test.pcap -w testout.pcap |
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
# http://llvm.org/apt/ | |
sudo bash -c "cat >> /etc/apt/sources.list" << LLVMAPT | |
# LLVM | |
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main | |
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main | |
# 3.6 | |
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main | |
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main | |
# 3.7 |
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
public static function firstByName($name) | |
{ | |
$instance = static::firstByAttributes(array('user_id' => $name)); | |
return $instance ?: null; | |
} | |
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
From 1b2359182660a7e5907311510cdd1e0eee45b3fe Mon Sep 17 00:00:00 2001 | |
From: Rolando Abarca <m@rolando.cl> | |
Date: Thu, 25 Oct 2012 14:19:51 -0700 | |
Subject: [PATCH] squashed commits | |
--- | |
.gitignore | 2 + | |
js/src/aclocal.m4 | 1 + | |
js/src/build-ios/build_ios_static_fat.sh | 55 ++++++++++++++++++ | |
js/src/build/autoconf/ios.m4 | 95 ++++++++++++++++++++++++++++++++ |
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
### | |
$ cat build-ios/build_ios_fat.sh | |
#!/bin/sh | |
# build.sh | |
IOS_BASE_SDK="5.1" | |
IOS_DEPLOY_TGT="5.0" | |
../configure --target=arm-apple-darwin10 --with-ios- | |
target=iPhoneSimulator --disable-shared-js --disable-tests --enable- |
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
http://blog.hmark.eu/2013/03/08/2d-lightning-effect-in-starling/ | |
http://nullcandy.com/particle-text-in-xna-and-javascript/ | |
http://gamedevelopment.tutsplus.com/tutorials/how-to-generate-shockingly-good-2d-lightning-effects--gamedev-2681 |
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
- (void)exitApplication { | |
[UIView beginAnimations:@"exitApplication" context:nil]; | |
[UIView setAnimationDuration:0.5]; | |
[UIView setAnimationDelegate:self]; | |
[UIView setAnimationTransition:UIViewAnimationCurveEaseOut forView:self.window cache:NO]; | |
[UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)]; | |
self.window.bounds = CGRectMake(0, 0, 0, 0); | |
[UIView commitAnimations]; | |
} | |
- (void)animationFinished:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { |
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
#include <algorithm> | |
#include <functional> | |
#include <cctype> | |
#include <locale> | |
// trim from start | |
static inline std::string <rim(std::string &s) { | |
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace)))); | |
return s; | |
} |
NewerOlder