Skip to content

Instantly share code, notes, and snippets.

@craigmffc
craigmffc / test123
Created Sep 21, 2021
Test 123 #plsql #test
View test123
select sysdate from dual;
View fxhash.rs
#[inline]
const fn add_to_hash(hash: u64, i: u64) -> u64 {
(hash.rotate_left(5) ^ i).wrapping_mul(0x517cc1b727220a95)
}
/// A const implementation of [`rustc_hash::FxHasher`]
pub const fn fxhash(v: &str) -> u64 {
let mut hash: u64 = 0;
let bytes = v.as_bytes();
let l = bytes.len();
@Luc2000
Luc2000 / main.dart
Created Sep 21, 2021
DDM6 - T5 PT3004252
View main.dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
View Canada
America/Atikokan
America/Blanc-Sablon
America/Cambridge_Bay
America/Creston
America/Dawson
America/Dawson_Creek
America/Edmonton
America/Fort_Nelson
America/Glace_Bay
America/Goose_Bay
@Leticia-Carraro
Leticia-Carraro / delete blob.py
Created Sep 21, 2021
Essa função apaga os blobs
View delete blob.py
''''É uma boa prática apagar os blobs após eles deixarem de ser necessários para o noso trabalho'''
def delete_blob(nome_bucket, nome_blob):
storage_client = storage.Client()
bucket = storage_client.get_bucket(nome_bucket)
blob = bucket.blob(nome_blob)
blob.delete()
@Leticia-Carraro
Leticia-Carraro / upload de blobs.py
Created Sep 21, 2021
Essa função faz o upload dos áudios no bucket
View upload de blobs.py
def upload_blob(nome_bucket, nome_arquivo_fonte, nome_blob_destino):
'''Essa função assume que você já fez a autenticação'''
storage_client = storage.Client()
bucket = storage_client.get_bucket(nome_bucket)
blob = bucket.blob(nome_blob_destino)
blob.upload_from_filename(nome_arquivo_fonte)
@choco-bot
choco-bot / FilesSnapshot.xml
Created Sep 21, 2021
telegraf v1.20.0 - Passed - Package Tests Results
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\telegraf\telegraf-1.20.0_windows_amd64.zip.txt" checksum="6F044B9313525E1F4AD094B1CB823359" />
<file path="C:\ProgramData\chocolatey\lib\telegraf\telegraf.nupkg" checksum="29BBFDF6D592687665E11C69CEE363E3" />
<file path="C:\ProgramData\chocolatey\lib\telegraf\telegraf.nuspec" checksum="F463CDDB94F4E2287AECE943398DBAA0" />
<file path="C:\ProgramData\chocolatey\lib\telegraf\tools\chocolateybeforemodify.ps1" checksum="74ACF4E943D467123A556E513E05E666" />
<file path="C:\ProgramData\chocolatey\lib\telegraf\tools\chocolateyinstall.ps1" checksum="DC1DB37325375B5C70B4057E67ADA203" />
<file path="C:\ProgramData\chocolatey\lib\telegraf\tools\chocolateyuninstall.ps1" checksum="CF9944D00B84784B0C5F349CFACD4605" />
</files>
@choco-bot
choco-bot / FilesSnapshot.xml
Created Sep 21, 2021
splunk-universalforwarder v8.2.2.1 - Failed - Package Tests Results
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\splunk-universalforwarder\splunk-universalforwarder.nupkg" checksum="F0D58AB95C9B7F8C879E1E48BCE5949B" />
<file path="C:\ProgramData\chocolatey\lib\splunk-universalforwarder\splunk-universalforwarder.nuspec" checksum="2EF0E35AA30224EDD583B2FFF199A0CD" />
<file path="C:\ProgramData\chocolatey\lib\splunk-universalforwarder\tools\chocolateyinstall.ps1" checksum="C59941388AFE6E6EA94A76D1B610DC3A" />
<file path="C:\ProgramData\chocolatey\lib\splunk-universalforwarder\tools\chocolateyuninstall.ps1" checksum="2DD83C88E1805BC17CD0F4E109702489" />
</files>
</fileSnapshot>
@openpanzer
openpanzer / openpanzer-save.json
Created Sep 21, 2021
Panzer-Verbaende Ostpreussen-8
View openpanzer-save.json
{"scenario":{"name":"Panzer-Verbaende Ostpreussen","maxTurns":20,"date":"1939-09-03T21:00:00.000Z","atmosferic":0,"latitude":2,"ground":0,"turnsPerDay":4,"dayTurn":0,"reinforcements":{"4":[],"5":[],"6":[],"7":[],"8":[{"row":17,"col":33,"unit":{"eqid":268,"id":-1,"owner":1,"hasMoved":false,"hasFired":false,"hasResupplied":false,"hasOverstrength":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":5,"facing":11,"flag":16,"destroyed":false,"transport":{"eqid":2531,"ammo":0,"fuel":34,"icon":"resources/units/images/pt456.png"},"carrier":0,"moveLeft":2,"ammo":7,"fuel":0,"hasAnimation":false,"hits":0,"experience":186,"entrenchment":0,"entrenchTicks":0,"leader":-1},"turn":"8","id":1},{"row":18,"col":35,"unit":{"eqid":264,"id":-1,"owner":1,"hasMoved":false,"hasFired":false,"hasResupplied":false,"hasOverstrength":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":10,"facing":11,"flag":16,"destroyed":false,
@leohmoraes
leohmoraes / gist:a028fbac9d198674caa27d574a70365b
Created Sep 21, 2021 — forked from mhawksey/gist:1442370
Google Apps Script to read JSON and write to sheet
View gist:a028fbac9d198674caa27d574a70365b
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}