Skip to content

Instantly share code, notes, and snippets.

🎧
‌‌

Wagner Souza waghcwb

🎧
‌‌
Block or report user

Report or block waghcwb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@waghcwb
waghcwb / code.md
Created Jan 11, 2020 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code
View code.md

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

View get-hardcoded-strings-jsp.js
const { readFile: originalReadFile, writeFile: originalWriteFile } = require('fs')
const { promisify } = require('util')
const { resolve, join } = require('path')
const originalGlob = require('glob')
const glob = promisify(originalGlob)
const readFile = promisify(originalReadFile)
const writeFile = promisify(originalWriteFile)
class Storefront {
View browser-detect.js
/**
* This method is used to detect the user browser and environment
*/
establishBrowser() {
const userAgent = (navigator && navigator.userAgent || '').toLowerCase()
const vendor = (navigator && navigator.vendor || '').toLowerCase()
const comparator = {
'<': function(a, b) { return a < b; },
'<=': function(a, b) { return a <= b; },
View call-nodejs-from-ant.xml
<!-- i needed to run webpack from ant build, so this was the solution -->
<macrodef name="nodejs">
<attribute name="module" description="The name of the NodeJS module to execute" />
<attribute name="failonerror" default="true" description="Fail if the exit code is not 0" />
<attribute name="dir" description="Directory to execute task" />
<element name="args" implicit="yes" description="Argument to pass to the exec task" />
<sequential>
<exec executable="cmd.exe" dir="@{dir}" failonerror="@{failonerror}" osfamily="winnt">
@waghcwb
waghcwb / encoding-video.md
Created Aug 8, 2019 — forked from Vestride/encoding-video.md
Encoding video for the web
View encoding-video.md

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@waghcwb
waghcwb / delete-slack-messages.js
Last active Jun 3, 2019 — forked from firatkucuk/delete-slack-messages.js
Deletes slack public/private channel and chat messages.
View delete-slack-messages.js
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = '<token>'; // You can learn it from: https://api.slack.com/custom-integrations/legacy-tokens
// GLOBALS #############################################################################################################
View fresh-install-windows.md

choco install 7zip.install

choco install putty.install

choco install nodejs.install

choco install skype

choco install python2

View convertToSeconds.js
// timeFormat = 'mm:ss'
function convertToSeconds(time) {
const [ minutes, seconds ] = time.split(':')
const minutesToSeconds = (Number(minutes) * 60)
return minutesToSeconds + Number(seconds)
}
@waghcwb
waghcwb / encrypt.js
Last active Apr 19, 2019 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
View encrypt.js
const crypto = require('crypto')
function encrypt(text) {
let key
let iv = crypto.randomBytes(16)
let hash = crypto.createHash('sha1')
hash.update(text)
return hash.digest().slice(0, 16).toString('hex')
View save-blob.js
const link = document.getElementById('link')
const data = { username: 'waghcwb' }
const json = JSON.stringify(data, null, 2)
const blob = new Blob([json], { type: 'octet/stream' })
const url = window.URL.createObjectURL(blob)
link.href = url
link.download = 'username.json'
You can’t perform that action at this time.