This file contains hidden or 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
update table set target_column=jsonb_set(source_column::jsonb, '{targetProperty}', 'newValue'::jsonb, true)::text where false |
This file contains hidden or 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 log --graph --decorate $(git rev-list -g --all) --oneline |
This file contains hidden or 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
cat $(find . -name package-lock.json | grep -v -e node_modules -e bower_components | paste -sd " ") | md5sum | cut -d ' ' -f 1 | |
cat $(find . -name package-lock.json -not -path "*/node_modules/*" -not -path "*/bower_components/*" | paste -sd " ") | md5sum | cut -d ' ' -f 1 |
This file contains hidden or 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.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export ANDROID_HOME=~/Android/Sdk | |
export PATH="$PATH:$ANDROID_HOME/tools" | |
export PATH="$PATH:$ANDROID_HOME/platform-tools" | |
# Path to your oh-my-zsh installation. | |
export ZSH="~/.oh-my-zsh" | |
export PATH="$PATH:/usr/local/bin" |
This file contains hidden or 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
'use strict'; | |
// Declare app level module which depends on views, and components | |
var app = angular.module('eopd', [ | |
'ngRoute', | |
'app.directives' | |
'app.services' | |
]) | |
.config([ | |
'$locationProvider', '$routeProvider', '$httpProvider', 'ScrollBarsProvider', function ($locationProvider, $routeProvider, $httpProvider, ScrollBarsProvider) { |
This file contains hidden or 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
{ | |
} |
This file contains hidden or 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 javax.servlet.http.HttpServletRequest; | |
import javax.ws.rs.WebApplicationException; | |
import javax.ws.rs.core.Context; | |
import javax.ws.rs.ext.Provider; | |
import org.jboss.resteasy.annotations.interception.ServerInterceptor; | |
import org.jboss.resteasy.core.ResourceMethod; | |
import org.jboss.resteasy.core.ServerResponse; | |
import org.jboss.resteasy.spi.Failure; | |
import org.jboss.resteasy.spi.HttpRequest; |
This file contains hidden or 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
update consumo set id_consumo_juncao = null | |
where id_consumo_juncao is not null; | |
delete from consumo_item; | |
update nota_item SET ID_ITEM_PAI = null | |
where ID_ITEM_PAI is not null; | |
delete from nota_item; |
This file contains hidden or 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
public String consultarSerialHD(String drive) { | |
StringBuilder result = new StringBuilder(); | |
try { | |
File file = File.createTempFile("tmp", ".vbs"); | |
file.deleteOnExit(); | |
FileWriter fw = new FileWriter(file); | |
String vbs = "Set objFSO = CreateObject(\"Scripting.FileSystemObject\")\n" + "Set colDrives = objFSO.Drives\n" | |
+ "Set objDrive = colDrives.item(\"" + drive + "\")\n" + "Wscript.Echo objDrive.SerialNumber"; | |
fw.write(vbs); | |
fw.close(); |
NewerOlder