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
import { createEffect, createSignal, onCleanup } from 'solid-js' | |
import server$, { eventStream } from 'solid-start/server' | |
function createEventStream({ url }: { url: string }, onMessage: (ev: MessageEvent) => void) { | |
createEffect(() => { | |
const eventSource = new EventSource(url) | |
eventSource.addEventListener('chat', (event) => { | |
onMessage(event) | |
}) |
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
for f in *; set n (echo $f | sed 's/\(.*\)\.\(.*\)\.\(.*\)\.pdf/\3-\2-\1.pdf/'); mv $f $n; end |
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
/* | |
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses | |
Floated div edition | |
01-05-2017 | |
(c) 2017 - Loran Kloeze - [email protected] | |
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds | |
of information from a range of phonenumbers. It doesn't matter if these numbers are part | |
of your contact list. At the end a table is displayed containing phonenumbers, profile pics, | |
about texts and online statuses. The online statuses are being updated every |
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
x = {} |
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
module.run(function($rootScope) { | |
$rootScope.$on($stateChangeSuccess, function($event, toState, toParams, fromState, fromParams) { | |
if(toState.title) | |
$rootScope.title = toState.title | |
}) | |
}) | |
module.config(function($stateProvider) { | |
$stateProvider.state('myState', { | |
data : { |
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
{ | |
request: function(url, method, data, headers) { | |
var request; | |
if (method == null) { | |
method = "GET"; | |
} | |
request = angular.isObject(url) ? angular.copy(url) : { | |
url: url | |
}; | |
request.method = request.method || method || "GET"; |
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
/** | |
* Workaround to make defining and retrieving angular modules easier and more intuitive. | |
*/ | |
(function(angular) { | |
var origMethod = angular.module; | |
var alreadyRegistered = {}; | |
/** |
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
var Twit = require("twit"); | |
var config = require('./oauthconfig'); | |
console.log("config:"); | |
console.log(config); | |
var T = new Twit({ | |
consumer_key: config.consumer_key, | |
consumer_secret: config.consumer_secret, | |
access_token: config.access_token, |
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
### | |
Object 2 XML Parser | |
@author Tobias Kopelke <[email protected]> | |
based on jsontoxml from Ryan Day @ https://github.com/soldair/node-jsontoxml | |
Example of 'special' object properties | |
node = | |
name: 'node-name' | |
attributes: 'node-attribs' |
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
// [~/Documents/code/node/myapp](master)$ ./bin/node -v | |
// => v0.2.1 | |
// [~/Documents/code/node/myapp](master)$ ./bin/express -v | |
// => 1.0.0rc4 | |
/** | |
* Module dependencies. | |
*/ | |
require.paths.unshift(__dirname + '/lib/node'); |
NewerOlder