Command | Description |
---|---|
git status |
Verifica status |
git add [file] |
Add um arquivo para staging area |
git add -a |
Adiciona (todos) arquivos novos e modificados para staging area |
git commit -m "[commit_message]" |
Commit |
git branch -a |
Lista todos os branches (locais e remotos) |
git branch -r |
Lista todos os branches remotos |
git branch -t [branch_name] [origin/branch_name] |
Cria um branch local e linka ele com o branch remoto existente |
git branch -d [branch_name] |
Deleta um branch local (forma segura) |
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
//Formas de deixar uma imagem de fundo | |
//Forma 1 | |
Container( | |
child: Image.asset('images/marvel_splash.jpg', | |
width: double.infinity, | |
height: double.infinity, | |
fit: BoxFit.fill, | |
), | |
); |
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
//De envio | |
new Thread(new Runnable() { | |
@Override | |
public void run() { | |
String texto = mensagem.getTexto(); | |
try { | |
URL url = new URL("http://address/polling"); | |
HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection(); | |
httpConnection.setRequestMethod("POST"); | |
httpConnection.setRequestProperty("Content-type", "application/json"); |
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
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main_activity); | |
TextView view = (TextView) findViewById(R.id.textview); | |
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
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main_activity); | |
TextView view = (TextView) findViewById(R.id.textview); | |
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
<!-- Colocar logo acima da tag <footer> --> | |
<a href="#" class="topbutton"> | |
<i class="fa fa-angle-up fa-lg"></i> | |
</a> |
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
//Adiciona Imagem de Destaque no feed RSS | |
function featuredtoRSS($content) { | |
global $post; | |
if (has_post_thumbnail($post->ID)){ | |
$content = '<div>'.get_the_post_thumbnail($post->ID, 'medium', array('style'=>'margin-bottom:15px;')).'</div>'.$content; | |
} | |
return $content; | |
} | |
add_filter('the_excerpt_rss', 'featuredtoRSS'); | |
add_filter('the_content_feed', 'featuredtoRSS'); |
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
<body> | |
<div id="content"> | |
<h1>Title</h1> | |
<article> Content </article> | |
</div> | |
<div id="editor"></div> | |
<button id="cmd">.PDF</button> | |
</body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/0.9.0rc1/jspdf.js"></script> |
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
<?php | |
function debug_to_console( $data ) { | |
if ( is_array( $data ) ) | |
$output = "<script>console.log( 'Debug Objects: " . implode( ',', $data) . "' );</script>"; | |
else | |
$output = "<script>console.log( 'Debug Objects: " . $data . "' );</script>"; | |
echo $output; | |
} | |
debug_to_console('Text'); |
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
<?php | |
add_action('init','redirect_visitors'); | |
function redirect_visitors(){ | |
$current = $_SERVER['REQUEST_URI']; | |
$wanted = '/wiki/login/'; | |
if(!is_user_logged_in()){ | |
if( $current != $wanted ){ | |
wp_redirect($wanted); | |
} |
NewerOlder