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
extension String | |
{ | |
subscript (i: Int) -> Character | |
{ | |
return self[advance(self.startIndex, i)] | |
} | |
subscript (i: Int) -> String | |
{ | |
return String(self[i] as Character) |
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
function listEvents(name) { | |
var cache = jQuery.cache, | |
exp = jQuery.expando, | |
key, cacheObj, events, event, namespace, handlers = [], | |
eventsObjects, eventObject, i, l; | |
for (key in cache) { | |
cacheObj = cache[key]; | |
if ("events" in cacheObj) { | |
events = cacheObj.events; |
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
*Updated for 3.4.2* | |
Turn off ALL Ads/Featured Content/Bundle Crap in Utorrent/Bittorrent: | |
Options > Preferences > Advanced... | |
Turn ALL settings to false: | |
bt.enable_pulse | |
distributed_share.enable | |
gui.show_notorrents_node | |
offers.left_rail_offer_enabled |
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
git config --global alias.logp 'log -n 40 --graph --decorate --date=relative --pretty=format:"%Cgreen%h %C(bold blue)%ad %C(yellow)%an: %Creset%s -%C(bold cyan)%d%Creset"' |
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
string resxFile = @"..\..\Resource1.resx"; // relative directory to the executable file | |
using (ResXResourceReader resxReader = new ResXResourceReader(resxFile)) | |
{ | |
resxReader.UseResXDataNodes = true; | |
foreach (DictionaryEntry entry in resxReader) | |
{ | |
var node = (ResXDataNode)entry.Value; | |
var value = node.GetValue((ITypeResolutionService)null); | |
var comment = node.Comment; | |
var key = entry.Key; |
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
{"swagger":"2.0","info":{"version":"v1","title":"Vulog Carsharing FO API"},"basePath":"/api-fo/final","paths":{"/v1/availableVehicles":{"get":{"tags":["AvailableVehicles"],"summary":"All available vehicles.","description":"Get the list of all available vehicles, it can be a lot of data.","operationId":"V{versionAvailableVehiclesGet","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[],"responses":{"200":{"description":"An array of available vehicles","schema":{"type":"array","items":{"$ref":"#/definitions/AvailableVehicle"}}},"204":{"description":"No available vehicle found"}}}},"/v1/device/notification":{"post":{"tags":["Device"],"summary":"Susbcribe a phone device for push notifications","operationId":"V{versionDeviceNotificationPost","consumes":["application/json","text/json","application/json-patch+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"subscription","in":"body","description":"the subscription details","required":false,"sche |
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
#!/bin/bash | |
MAC_ON="18:74:2e:26:95:d9" | |
MAC_PAMPERS="b4:7c:9c:bd:eb:f0" | |
function onClick { | |
#code to be ran on click | |
#node ./mqtt.js | |
#mosquitto_pub -h 192.168.1.12 -t cmnd/chevet2/power -m TOGGLE | |
found_mac=$2 | |
if [[ $found_mac == *"$MAC_ON"* ]]; then |
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
[Unit] | |
Description = Handle amazon dash button click | |
After = network.target | |
[Service] | |
ExecStart = /mnt/dietpi_userdata/amazon-dash.sh > /dev/null | |
[Install] | |
WantedBy = multi-user.target | |
# to put inside /etc/systemd/system/ |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |