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
| declare module jsforce { | |
| /*********************** | |
| * GENERICS | |
| ***********************/ | |
| type Buffer = any; | |
| type Stream = any; | |
| /*********************** |
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
| if (!sforce) { | |
| throw "unable to find sforce. Make sure that connection.js is loaded before apex.js script"; | |
| } | |
| sforce.Apex = function(){ | |
| }; | |
| sforce.RunTestsRequest = function() { |
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
| # A very basic HTTP server | |
| require "http/server" | |
| server = HTTP::Server.new(8080) do |context| | |
| context.response.content_type = "text/plain" | |
| context.response.print "Hello world, got #{context.request.path}!" | |
| end | |
| puts "Listening on http://127.0.0.1:8080" | |
| server.listen |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <soapenv:Header xmlns="http://soap.sforce.com/schemas/package/AngularAppController"> | |
| <SessionHeader> | |
| <sessionId>00D36000000b28L!ARsAQJJ....</sessionId> | |
| </SessionHeader> | |
| </soapenv:Header> | |
| <soapenv:Body xmlns="http://soap.sforce.com/schemas/package/AngularAppController"> | |
| <executeQuery> | |
| <query>SELECT Id, Salutation, FirstName, LastName, PhotoUrl FROM Contact</query> |
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
| global class AngularAppController { | |
| @RemoteAction | |
| WebService static List<sObject> executeQuery(String query) { | |
| return Database.query(query); | |
| } | |
| } |
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
| # Maintainer: sixpindin <[email protected]> | |
| pkgname=omnisharp-roslyn | |
| pkgver=1.22.0 | |
| pkgrel=1 | |
| pkgdesc=".NET development platform based on on Roslyn workspaces." | |
| arch=('x86_64') | |
| url="https://github.com/OmniSharp/omnisharp-roslyn" | |
| license=('MIT') | |
| depends=('mono-git', 'libuv') | |
| noextract=('$pkgname-$pkgver.tar.gz') |
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
| type | |
| NodeKind = enum | |
| nkValue, | |
| nkLiteral, | |
| nkSymbol, | |
| nkPair, | |
| nkLookupVal, | |
| nkIf, | |
| nkIfAsync, | |
| nkInlineIf, |
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
| function gen_ssh_key { | |
| # Generate an ssh key | |
| filename=${2:-"~/.ssh/id_rsa"} | |
| ssh-keygen -f $filename -t rsa -b 4096 -C "$1" -N "" | |
| if hash xclip 2>/dev/null; then | |
| cat $2.pub | xclip -selection clipboard | |
| elif hash pbcopy 2>/dev/null; then | |
| cat $2.pub | pbcopy | |
| else |
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
| require "benchmark" | |
| Benchmark.ips do |x| | |
| str = "this is text with too many spaces in it" | |
| x.report("gsub") do | |
| 500.times { str = str.gsub(/\s+/, " ") } | |
| end | |
| x.report("split/join") do | |
| 500.times { str = str.split().join(" ") } | |
| 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
| <script type="text/javascript"> | |
| window.location = "http://yoursite.com/yourpage"; | |
| </script> |