__m128 _mm_load_ps (float * a)
{
This file contains hidden or 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 : http://en.wikipedia.org/wiki/Mersenne_twister | |
| */ | |
| let MT | |
| let index | |
| class PRNG { | |
| static setSeed(seed) { | |
| // Create a length 624 array to store the state of the generator | |
| MT = new Uint32Array(624) | |
| index = 0 |
This file contains hidden or 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 | |
| if [ $# -ne 1 ]; then | |
| echo "Usage : $0 <file to compress>" | |
| exit 1 | |
| fi | |
| file=${1%%/} | |
| tar c "$file" | lz4 -z - "$file.tar.lz4" |
This file contains hidden or 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 Echo.Server do | |
| def start(port) do | |
| tcp_options = [:binary, {:packet, 0}, {:active, false}] | |
| {:ok, socket} = :gen_tcp.listen(port, tcp_options) | |
| listen(socket) | |
| end | |
| defp listen(socket) do | |
| {:ok, conn} = :gen_tcp.accept(socket) | |
| spawn(fn -> recv(conn) end) |
This file contains hidden or 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
| 10.3 (Panther): | |
| https://swscan.apple.com/scanningpoints/scanningpointX.xml | |
| 10.4 (Tiger): | |
| https://swscan.apple.com/content/catalogs/index.sucatalog | |
| https://swscan.apple.com/content/catalogs/index-1.sucatalog | |
| 10.5 (Leopard): | |
| https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog |
This file contains hidden or 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
| // | |
| // MTKCIImageView.swift | |
| // Fil | |
| // | |
| // Created by Muukii on 9/27/15. | |
| // Copyright © 2015 muukii. All rights reserved. | |
| // | |
| import Foundation | |
| import Metal |
This file contains hidden or 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
| <style> | |
| .Alert { | |
| padding: 2em; | |
| } | |
| .Alert-Success { | |
| border: 10px solid green; | |
| } | |
| .Alert-Error { | |
| border: 10px solid red; | |
| } |
This file contains hidden or 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
| /// This playground shows how to send and receive packets with low-level Posix UPD protocol API. | |
| import Foundation /// Used for NSUTF8StringEncoding | |
| import XCPlayground | |
| /// Ensure the playground doesn't stop executing at the end of the main thread. | |
| XCPlaygroundPage.currentPage.needsIndefiniteExecution = true | |
| /** Workaround for Swift not having access to the htons, htonl, and other C macros. | |
| This is equivalent to casting the value to the desired bitsize and then |
This file contains hidden or 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 | |
| sudo mount -o remount,size=10G,noatime /tmp | |
| echo "Done. Please use 'df -h' to make sure folder size is increased." |
This file contains hidden or 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
| import axios from 'axios' // for promise examples | |
| import request from 'request' // for callback example | |
| /** | |
| * Services | |
| */ | |
| const service = { | |
| getPeople: () => axios({ url: 'http://localhost:3000/people' }), | |
| getPlaces: () => axios({ url: 'http://localhost:3000/places' }) | |
| } |