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
Blob cryptoKey = Crypto.generateAesKey(128); | |
Blob iv = Blob.valueOf('0123456789012345'); | |
System.debug(EncodingUtil.base64encode(cryptoKey)); | |
Blob data = Blob.valueOf('TestTest'); | |
Blob encryptedData = Crypto.encrypt('AES128', cryptoKey, iv, data); | |
System.debug(EncodingUtil.base64encode(encryptedData)); | |
//Blob decryptedData = Crypto.decrypt('AES128', cryptoKey, encryptedData); | |
//System.debug(decryptedData.toString()); |
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 jsforce = require('jsforce'); | |
var conn = new jsforce.Connection({ | |
loginUrl : 'https://login.salesforce.com' | |
}); | |
conn.login("{username}", "{password}", function(err, userInfo) { | |
conn.sobject('hoge__c') | |
.find({}) | |
.destroy(function(err, rets) { | |
if (err) { return console.error(err); } | |
console.log(rets); |
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
cd C:\Users\hoge\vagrant | |
vagrant up | |
net use Z: \\192.168.33.10\Share /user:vagrant vagrant |
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 json | |
import psycopg2 | |
import psycopg2.extras | |
import random | |
SETTINGS_JSON = 'settings.json' | |
RANDOM_SOURCE_STR = 'abcdefghijklmnopqrstuvwxyz0123456789' | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import paho.mqtt.client as mqtt | |
import json | |
host = 'std1.mqtt.shiguredo.jp' | |
port = 8883 | |
#port = 1883 | |
req_topic = '{request_topic}' |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"bufio" | |
"io" | |
"os/exec" | |
) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include <malloc/malloc.h> | |
int main(void) | |
{ | |
char *buf = NULL; |
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
//暗号化 | |
private static final String cryptoKey = '{base 64 encoded key}'; | |
public static String encryptedData(String s) { | |
Blob encryptedData = Crypto.encryptWithManagedIV('AES256', EncodingUtil.base64Decode(cryptoKey), Blob.valueOf(s)); | |
System.debug(encryptedData); | |
System.debug(EncodingUtil.base64Encode(encryptedData)); | |
String data = EncodingUtil.convertToHex(encryptedData); | |
String half1 = data.substring(0, data.length()/2); | |
String half2 = data.substring(data.length()/2, data.length()); |
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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
# gem "rails" | |
gem "faraday" |
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
--- | |
- hosts: db_servers | |
become: yes | |
user: vagrant | |
vars: | |
- mysql_root_password: password | |
tasks: | |
- name: install rpm repository | |
yum: name=https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm state=present |