Skip to content

Instantly share code, notes, and snippets.

View rgdevment's full-sized avatar
🧑‍🎓
Learning

Rodrigo García rgdevment

🧑‍🎓
Learning
View GitHub Profile
@rgdevment
rgdevment / list.js
Last active July 1, 2020 16:12
[Paginación ExtJs] Permite crear una grilla con paginación desde ExtJs con PHP obteniendo datos desde una db en Oracle #ExtJs #PHP #Oracle
xtype: 'list',
itemId: 'MiListView',
store: 'MainStore',
masked: {xtype: 'loadmask', message: 'Cargando...'},
plugins:[
{
xclass:'Ext.plugin.ListPaging',
autoPaging: false,
// These override the text; use CSS for styling
@rgdevment
rgdevment / EnlacesSQLiteHelper.java
Last active July 1, 2020 16:12
[Databse on ASndroid] Crear clase para utilizar datos localmente en Android con Java y SQLite #Android #Java #SQLite
package cl.atic.enlacesfcab.fcabenlaces;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
public class EnlacesSQLiteHelper extends SQLiteOpenHelper {
//Creamos la tabla
@rgdevment
rgdevment / EnlacesActivity.java
Last active July 1, 2020 16:09
[Fragment ViewPager] OnResume, OnPause with ViewPager #Android #Java #ViewPager #Fragment
public class EnlacesActivity extends FragmentActivity {
private FragmentPageAdapter pageAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_enlace);
FragmentPageAdapter adapter = new FragmentPageAdapter(getSupportFragmentManager());
pageAdapter = new FragmentPageAdapter(getSupportFragmentManager());
@rgdevment
rgdevment / EnlacesActivity.java
Last active July 1, 2020 16:11
[Fragment to Activity] enviar datos cuando el fragmento esta visible para el usuario por medio de interfaz a una actividad #Fragment #Java #Android
public class EnlacesActivity extends FragmentActivity implements InterfacesClass.OnFragmentInteractionListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_enlace);
}
@Override
public void onFragmentCreated(HashMap<String, String> data) {
@rgdevment
rgdevment / uninstall_node.sh
Last active July 1, 2020 16:08
[Uninstall Node ] JS and NOM on macos Mojave ++
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/share/man/man1/node*
sudo rm -rf /usr/local/share/man/man1/npm*
sudo rm -rf /usr/local/lib/dtrace/node.d
@rgdevment
rgdevment / DateFilter.js
Last active July 1, 2020 16:09
[DateRanger ReactJs] plugins and config for date ranger picker on ReactJs #plugins #date #reactjs
import {DateRangePicker} from "react-date-range";
import {customInputRanges, staticCustomRanges} from "./DatePickerConfig";
import * as rdrLocales from "react-date-range/src/locale";
import React, {useState} from "react";
import {addDays} from "date-fns";
const DateFilter = () => {
const [dateRange, updateDateRange] = useState({
startDate: new Date(),
@rgdevment
rgdevment / cloudSettings
Last active July 1, 2020 16:11
[Visual Studio Settings] personal setting for visual studio code
{"lastUpload":"2020-06-16T14:43:16.031Z","extensionVersion":"v3.4.3"}
@rgdevment
rgdevment / docker-prune-all.sh
Last active July 1, 2020 16:06
[Clear Docker] destroy and prune container, images, volumes and networks in docker #docker
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
@rgdevment
rgdevment / UninstallTrend.sh
Created July 1, 2020 16:05
[Uninstall Trend] uninstall trend on macos #Antivirus #Trend
#!/bin/sh
launchctl unload /Library/LaunchDaemons/com.trendmicro.icore.av.plist
rm /Library/LaunchDaemons/com.trendmicro.*
rm -r "/Library/Application Support/TrendMicro"
rm -r /Library/Frameworks/TMAppCommon.framework
rm -r /Library/Frameworks/TMAppCore.framework
rm -r /Library/Frameworks/TMGUIUtil.framework
rm -r /Library/Frameworks/iCoreClient.framework
rm -r /Applications/TrendMicroSecurity.app